django-rq icon indicating copy to clipboard operation
django-rq copied to clipboard

Job OK but target function doesn't executed

Open proft opened this issue 9 years ago • 2 comments

Hello!

I have long running task (mailing list). My function fetch all recipients and send simple notify, then set flag and then send status. On test stage with 2 recipients it doesn't go till end. Steps:

  1. Started from admin
  2. In log I see 17:32:14 default: Job OK
  3. Check mailbox for message - nothing
  4. Check field with status - false (must be true)
  5. Check mailbox for status message - nothing

So, why Job OK but function with task doesn't executed?

My environment

Django==1.6.6
django-rq==0.8.0

proft avatar Nov 18 '16 15:11 proft

Having the same trouble, some jobs are queued but never executed. Anyone already solved this?

kvnramirez avatar Aug 20 '19 14:08 kvnramirez

The only partial solution that I found with django is to store a record on the db with creation time and some status(pending, executed, error) and enqueuing the job and then run a cron job with a django managament command to manually check how much time passed after object creation and if it's still pending and then enqueue the job again expecting some worker take and proccess it.

kvnramirez avatar Aug 30 '19 16:08 kvnramirez