You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2012/09/19 20:43:27 UTC
[20/50] git commit: [#4914] avoid 10s sleep after error,
when shutting down
[#4914] avoid 10s sleep after error, when shutting down
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/e7ece83e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e7ece83e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e7ece83e
Branch: refs/heads/master
Commit: e7ece83e20cdc774556333791e99ddf10fde9964
Parents: 2c8b2af
Author: Dave Brondsema <db...@geek.net>
Authored: Fri Sep 14 19:16:11 2012 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Fri Sep 14 19:45:26 2012 +0000
----------------------------------------------------------------------
Allura/allura/command/taskd.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e7ece83e/Allura/allura/command/taskd.py
----------------------------------------------------------------------
diff --git a/Allura/allura/command/taskd.py b/Allura/allura/command/taskd.py
index 9068186..64f953b 100644
--- a/Allura/allura/command/taskd.py
+++ b/Allura/allura/command/taskd.py
@@ -97,8 +97,11 @@ class TaskdCommand(base.Command):
list(wsgi_app(r.environ, start_response))
self.task = None
except Exception:
- base.log.exception('taskd error; pausing for 10s before taking more tasks')
- time.sleep(10)
+ if self.keep_running:
+ base.log.exception('taskd error; pausing for 10s before taking more tasks')
+ time.sleep(10)
+ else:
+ base.log.exception('taskd error')
base.log.info('taskd pid %s stopping gracefully.' % os.getpid())
if self.restart_when_done: