Automattic / kue

Kue is a priority job queue backed by redis, built for node.js.
http://automattic.github.io/kue
MIT License
9.46k stars 867 forks source link

Ability to move messages from failed queue back to queue #64

Open ghost opened 13 years ago

ghost commented 13 years ago

Is there a way to move messages from failed queue back to queue for processing once for example the sysadmins have fixed the email server etc.. We rely on this on ActiveMQ and MSMQ (although with MSMQ we have to use a third party tool to handle this)

tj commented 13 years ago

currently you can do it via the UI or JSON API, or of course javascript programmatically. One thing I would personally like is some batch operations in the UI so you can reactivate a swath of jobs that you want to retry etc

ghost commented 13 years ago

Maybe I missing something obvious but how do I do this from the UI?

tj commented 13 years ago

yeah it's not too obvious but you can click the state to get a select list

bulkan commented 11 years ago

@drudge / @visionmedia does this issue need to be open still ?

drudge commented 11 years ago

We can leave it open, I think adding batching to the UI is a good idea. Select multiple jobs, re-queue.

campbellanderson commented 10 years ago

+1 A simple re-queue button would suffice for my needs

behrad commented 10 years ago

can be added in the next release

thomasmodeneis commented 9 years ago

I did the trick via UI to move a job from failed to inactive and then the job is picked up to run again. Is there any way to do this using the REST ? I mean post /job/id --data state:active

You know what I mean ? cheers.

behrad commented 9 years ago

if you check the code behind that UI action you will find out the actual REST request to change job state, however I'm not convinced to expose that in public API documentation for now :)

thomasmodeneis commented 9 years ago

Oh right, that's a good one. I will check, cheers for the tip.

hooperp commented 8 years ago

did you get to a solution ?

thomasmodeneis commented 8 years ago

I did not got any solution for this, in fact I ended having to abandon kue because of the absence of this feature.

behrad commented 8 years ago
kue.Job.rangeByState( 'failed', 0, n, 'asc', function( err, jobs ) {
  jobs.map( function( job ){  job.inactive();  });
});

OR

queue.failed( function( err, ids ) {
  ids.map( function( id ){
    kue.Job.get( id, function( err, job ){
      job.inactive();
    });
  });
});
lindo-jmm commented 8 years ago

Just curious, is there still an actual issue here?

behrad commented 8 years ago

I just keep it opened to remember to add a UI trigger for requeue-ing jobs.