summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2013-05-21 10:08:09 +0100
committerSteve Kemp <steve@steve.org.uk>2013-05-21 10:08:09 +0100
commit299b657c0cc24b3cd2ee81725768e4d24f73dc0c (patch)
tree0da35c1c28dd3c69d060b3b8e914de4fee828d5d /bin
parent0dd4f3a2041b531c7d34a107ee93598f0f6dcbcf (diff)
Ensure that jobs last for 300 seconds, rather than the default of 120.
This allows job.reserve() to keep a job for a "long" time.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/custodian-enqueue12
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/custodian-enqueue b/bin/custodian-enqueue
index e2e4420..4aab52e 100755
--- a/bin/custodian-enqueue
+++ b/bin/custodian-enqueue
@@ -178,7 +178,17 @@ if __FILE__ == $0 then
elsif ( ENV['DUMP'] )
puts test
else
- queue.put( test.to_s )
+
+ # priority of new job.
+ priority = 1000
+
+ # delay before putting into queue.
+ delay = 0
+
+ # time-to-remove: how long job.reserve() will live for.
+ ttr = 300
+
+ queue.put( test.to_s, priority, delay, ttr )
end
end