From 299b657c0cc24b3cd2ee81725768e4d24f73dc0c Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Tue, 21 May 2013 10:08:09 +0100 Subject: 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. --- bin/custodian-enqueue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1