I prefer your second suggestion of showing requeue action only for Failed
queues.


Win~


On Mon, Jun 2, 2014 at 5:02 PM, Leszek Piątek <notifications@github.com>
wrote:

> In django_rq/views.py:
>
> > +                for job_id in job_ids:
> > +                    job = Job.fetch(job_id, connection=queue.connection)
> > +                    job.delete()
> > +
> > +                messages.info(request, 'You have successfully deleted %s jobs!' % len(job_ids))
> > +            elif request.POST['action'] == 'requeue':
> > +                requeued = 0
> > +                for job_id in job_ids:
> > +                    try:
> > +                        requeue_job(job_id, connection=queue.connection)
> > +                        requeued += 1
> > +                    except InvalidJobOperationError:
> > +                        pass
> > +
> > +                messages.info(request, 'You have successfully requeued %d of %d selected jobs!' % (requeued,
> > +                                                                                                   len(job_ids)))
>
> I came to one problem - requeuing not failed jobs. What should be the
> default behaviour? Currently I just ignore those. But we could delete and
> then add again those jobs (I don't know actually why we would like to do
> that). Other option is to hide requeue action and show it only for failed
> queue?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ui/django-rq/pull/59/files#r13277428>.
>