summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-06-26 15:23:37 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-06-26 15:57:00 +0000
commit2c589f50bc640ada7469986582d5dc68ad90f8ed (patch)
tree60d1639dc610e1f133f9aa7a58c10226fc43abbe
parent4221ae7336fe8bd7d208b5228eb73b280f510a0b (diff)
downloadlorry-controller-2c589f50bc640ada7469986582d5dc68ad90f8ed.tar.gz
Add --ghost-timeout option to WEBAPP
-rwxr-xr-xlorry-controller-webapp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lorry-controller-webapp b/lorry-controller-webapp
index 9234498..d590f83 100755
--- a/lorry-controller-webapp
+++ b/lorry-controller-webapp
@@ -28,6 +28,9 @@ from flup.server.fcgi import WSGIServer
import lorrycontroller
+ONE_HOUR = 3600
+
+
class WEBAPP(cliapp.Application):
def add_settings(self):
@@ -110,6 +113,13 @@ class WEBAPP(cliapp.Application):
metavar='DIR',
default='/usr/share/lorry-controller/static')
+ self.settings.integer(
+ ['ghost-timeout'],
+ 'running jobs should get an update from their '
+ 'MINION within this time or they will be considered '
+ 'ghosts and be removed from STATEDB (in seconds)',
+ default=ONE_HOUR)
+
def find_routes(self):
'''Return all classes that are API routes.