diff options
author | Steve Kemp <steve@steve.org.uk> | 2013-05-21 10:08:09 +0100 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2013-05-21 10:08:09 +0100 |
commit | 211337827eac4d5a429610c38d34502f83176b35 (patch) | |
tree | c02958f914fec4abad0cbc5c64f737d0a01ea863 /bin | |
parent | 3938e2a6d94d3af7d598b3e5339b2d182325a13b (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-x | bin/custodian-enqueue | 12 |
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 |