From fbd4e3bf99afbc80012d6dc029be19e1bd8e6890 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 18 Jan 2016 14:13:24 +0200 Subject: 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. --- bin/custodian-enqueue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'bin/custodian-enqueue') 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 -- cgit v1.2.1