summaryrefslogtreecommitdiff
path: root/bin/custodian-enqueue
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2016-01-18 14:13:24 +0200
committerSteve Kemp <steve@steve.org.uk>2016-01-18 14:13:24 +0200
commitfbd4e3bf99afbc80012d6dc029be19e1bd8e6890 (patch)
tree30104c04fb5eb11dadb2b32028ca48971704f226 /bin/custodian-enqueue
parentcee58bfa0e6fbcd3d147a7f7a694187d36ef9368 (diff)
Updated the queue-handling.
We now use a zset to store our pending tests. This means that jobs are only in the queue once - no duplicates are allowed. This closes #12428.
Diffstat (limited to 'bin/custodian-enqueue')
-rwxr-xr-xbin/custodian-enqueue11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/custodian-enqueue b/bin/custodian-enqueue
index 7dd864b..f4f9f0e 100755
--- a/bin/custodian-enqueue
+++ b/bin/custodian-enqueue
@@ -85,16 +85,25 @@ if __FILE__ == $PROGRAM_NAME
exit(1)
end
+ #
+ # Did we fail to add any tests to the queue?
+ #
+ failed = false
+
mon.jobs.each do |test|
if ENV['TEST']
# nop
elsif ENV['DUMP']
puts test
else
- queue.add(test.to_s)
+ failed = true unless queue.add(test.to_s)
end
end
+ if ( failed )
+ puts "We failed to add at least one job to the queue."
+ exit( 1 )
+ end
end