Repository: incubator-singa Updated Branches: refs/heads/master beb5e7262 -> e5a3e52ee
SINGA-266 Add Rafiki python toolkits - fix bug, sleep a while when agent stop Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/e5a3e52e Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/e5a3e52e Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/e5a3e52e Branch: refs/heads/master Commit: e5a3e52ee5840683d8965b66904d2b63ac2db244 Parents: beb5e72 Author: aaronwwf <[email protected]> Authored: Tue Nov 1 16:35:32 2016 +0800 Committer: aaronwwf <[email protected]> Committed: Tue Nov 1 16:35:32 2016 +0800 ---------------------------------------------------------------------- python/rafiki/agent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/e5a3e52e/python/rafiki/agent.py ---------------------------------------------------------------------- diff --git a/python/rafiki/agent.py b/python/rafiki/agent.py index d31c9da..8974051 100644 --- a/python/rafiki/agent.py +++ b/python/rafiki/agent.py @@ -90,6 +90,8 @@ class Agent(): return def stop(self): + #sleep a while, wait for http response finished + time.sleep(1) self.p.terminate() def start(port,info_queue,command_queue): @@ -116,7 +118,6 @@ def getDataFromInfoQueue(need_return=False): return msg,d time.sleep(0.01) - @app.route("/") @cross_origin() def index():
