Jump to:
| Project: | Job queue |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (works as designed) |
Issue Summary
It would be great if the module is able to execute tasks that have been added by a task that has been added after queue processing started, but before it times out.
1. Job 1 executes function foo1(bar)
2. Job 1 adds a new job to the job_queue
3. Job 1 finishes
4. job_queue scans for new jobs, until cron time out/2 is reached
5. Job 2 executes function foo1(bar)
6. Job 2 adds a new job to the job_queue
7. Job 2 finishes
8. job_queue scans for new jobs, until cron time out/2 is reached
9. etc.
I'm executing jobs in linkchecker module that are normally fast and may take only a few seconds, but can only added one by one. As job_queue normally tries to use half of the cron time to execute tasks there is much time left to execute more new jobs. This would make the job_queue working like batch api without JS.
Comments
#11
This is what I hoped job_queue would do, am surprised it doesn't yet.
#12
The best practice for handling failed jobs is for the job to re-queue itself. Often this happens because a 3rd-party resource is offline. This makes a pointless semi-infinite loop if the queue is relatively empty.