python - Deploy from github to bottle with reloader -


i'm trying bottle webapp reload newest code, whenever it's pushed github. it's working of time, not always.

in github i've set trigger http://my.server.com:8080/deploy.

in bottle have code getting latest source:

@post("/deploy") def deploy():     if request.json["ref"] != "refs/heads/master":         return "ok"  # care pushes master      print "deployment requested"     call(["git", "fetch"])     call(["git", "reset", "--hard", "origin/master"])      print "deployment successful"     return "ok" 

and later, server reload new source i've set reloader:

run(host=host_address, port=8080, debug=true, reloader=true) 

it works, exception happens around time code fetched. seems fails whenever server busy handling other requests while tries reload. stack traces gives me various stuff, concerning keyboardinterrupt, suppose reloader uses kill running app.

is strategy flawed or missing reloader property?


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -