diff options
Diffstat (limited to 'util')
-rwxr-xr-x | util/empty-queue | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/util/empty-queue b/util/empty-queue deleted file mode 100755 index 5f84d53..0000000 --- a/util/empty-queue +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/ruby -# -# Empty the beanstalk-queue. -# -# This is useful if you're aborting runs, or messing with the parser. -# -# Steve -# -- -# - - - -require 'beanstalk-client' - -beanstalk = Beanstalk::Pool.new(['localhost:11300']) - -# -# Run until we receive a timeout-error - because retrieval of jobs failed. -# -while(true) - begin - puts "\nWaiting for job.." - job = beanstalk.reserve(1) - id = job.id - puts "\tDeleted job #{id}" - job.delete - rescue Beanstalk::TimedOut => ex - puts "Queue is empty" - exit(0) - end -end - - |