diff options
| author | Steve Kemp <steve@steve.org.uk> | 2012-11-12 22:35:32 +0000 | 
|---|---|---|
| committer | Steve Kemp <steve@steve.org.uk> | 2012-11-12 22:35:32 +0000 | 
| commit | f0e4f85733c447d72913e0ceca19d5f783c5f01f (patch) | |
| tree | 6a5bbe0b973dbfbd02fc579f6b8b14eea753a083 /util | |
| parent | d603704eb3d4df5832cadcfe09719b7c2499a2d5 (diff) | |
  Removed now the worker has a --flush argument.
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 - - | 
