Needs work
Project:
Job queue
Version:
5.x-2.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
10 Jan 2008 at 06:18 UTC
Updated:
21 Jul 2008 at 01:13 UTC
Jump to comment: Most recent file
This patch depends on http://drupal.org/node/208286.
This patch adds a locked column to to the job_queue table and add a locked argument to job_queue_dequeue. When a job is dequeued the locked column will be set to the locked argument. You can use this to identify the called of job_queue_dequeue in the case you have multiple servers or processes handling the job queue.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | jobqueue.test | 2.71 KB | dopry |
| #1 | job_queue-locking.patch | 2.15 KB | dopry |
Comments
Comment #1
dopry commentedComment #2
dopry commentedhere is an updated .test file to cover attempting to dequeue a locked job... It's hard to really test the feature, since you can't easily emulate concurrency within a test.
Comment #3
drummThe code has changed a bit in Drupal 6.
I would like to use this opportunity to add more information to the queue UI. The job status could be added to admin/reports/job_queue which says that the job is running, and for how long.