nesquena / backburner

Simple and reliable beanstalkd job queue for ruby
http://nesquena.github.com/backburner
MIT License
429 stars 69 forks source link

How can clear enqueue jobs in backburner with beanstalkd in rails #81

Closed mzaragoza closed 9 years ago

mzaragoza commented 9 years ago

How can I remove all jobs from a campaign?

ryanjohns commented 9 years ago

I would either use the beaneater API directly or use a tool like beanstalkd_view gem which provides a web-based management UI.

beanstalk = Beaneater::Pool.new(['localhost:11300'])
tube = beanstalk.tubes["some-tube"]
while tube.peek(:ready)
  job = tube.reserve
  job.delete
end
beanstalk.close

https://github.com/denniskuczynski/beanstalkd_view