summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Burmeister <joe.burmeister@codethink.co.uk>2012-11-21 14:55:53 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-11-21 14:55:53 +0000
commit8ee8c6edb26a250a71f904e6766d953c9b1011f4 (patch)
tree89754a82738c57bb5936dfe0c1f9601f70aa5d1c
parent0fc1f9bf9e00f73892835b4b9ceab44b0fc2a5f3 (diff)
downloadlorry-controller-8ee8c6edb26a250a71f904e6766d953c9b1011f4.tar.gz
Make new lorries overdue so processed sooner rather than later.
Reviewed-by: Lars Wirzenius
-rwxr-xr-xlorry-controller2
1 files changed, 2 insertions, 0 deletions
diff --git a/lorry-controller b/lorry-controller
index b3c2c45..e32a6e9 100755
--- a/lorry-controller
+++ b/lorry-controller
@@ -157,6 +157,8 @@ class LorryController(cliapp.Application):
conf_uuid = lorry['controller-uuid']
conf = self.conf.configs[conf_uuid]
nextdue = self.conf.duetimes[new_lorry]
+ # Make new lorries overdue.
+ nextdue -= conf['interval-parsed']
should_create = conf['create'] == "always"
store_state = True
if should_create: