librelist archives

« back to archive

Is there a way to selectively remove items from the queue after they've been added?

Is there a way to selectively remove items from the queue after they've been added?

From:
David Parkinson
Date:
2011-07-18 @ 22:37
I'd like to be able to destroy all items in a particular queue for a given
user ID, or ActiveRecord model.

I did a bit of research before asking this question and turned up the
following.  I'm just wondering what the best practice for doing this is.
 Especially as most updates were from last year.


@jblochjohnson <https://github.com/jblochjohnson>: Its pretty easy to clear
an *entire* queue of jobs by accessing redis, but with Resque alone its
impossible to single out a specific job and kill/remove it. I have a plugin
which lets you track/kill specific jobs (quirkey/resque-status).

=David

--
http://www.davidparkinson.com
http://www.linkedin.com/in/davidcparkinson

Re: [resque] Is there a way to selectively remove items from the queue after they've been added?

From:
Philippe Lafoucrière
Date:
2011-07-19 @ 05:48
On Tue, Jul 19, 2011 at 12:37 AM, David Parkinson
<david@davidparkinson.com> wrote:
> I'd like to be able to destroy all items in a particular queue for a given
> user ID, or ActiveRecord model.
> I did a bit of research before asking this question and turned up the
> following.  I'm just wondering what the best practice for doing this is.
>  Especially as most updates were from last year.

I don't think there's a better practice than #dequeue ;)
http://whatcodecraves.com/articles/2010/06/22/resque_cheatsheet/index.html