Download & Extend

Update to Drush integration

Project:Drupal Queue
Version:6.x-1.2
Component:Code
Category:feature request
Priority:normal
Assigned:gordon
Status:needs review

Issue Summary

I have made some changes to the Drush integration to allow the queue to be run a little differently other than just calling the drupal_queue_cron_run() just once.

I have made it so you can run it 3 different ways.

1. As it is now, run once and exit, or n times.
2. Run forever.
3. Run until the all the queues have no jobs.

ATM I am using option 3 to process a ton of jobs that need to be caught up on.

AttachmentSizeStatusTest resultOperations
drush.changes.patch2.72 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drush.changes.patch.View details | Re-test

Comments

#1

I have fixed up the patch so that it will pass the tests and apply easier.

AttachmentSizeStatusTest resultOperations
1020946.patch2.56 KBIdlePASSED: [[SimpleTest]]: [MySQL] 8 pass(es).View details | Re-test

#2

Status:needs review» needs work

The last submitted patch, 1020946.patch, failed testing.

#3

subscribe.

#4

subscribe, and tagging as this may be crucial for phase 2

#5

Untagging. We got around it.

#6

Status:needs work» needs review

drush.changes.patch queued for re-testing.

#7

#1: 1020946.patch queued for re-testing.

#8

This is similar to what the DataSync (http://drupal.org/project/datasync) module does - it starts a daemon on cron that forks into multiple workers and they process the queue at a limited concurrency level until it's empty, then the forks exit back to the main daemon and it polls for jobs and the process starts again.

You might be able to take some inspiration from it?

I've been using DataSync in prod for years, just looking at switching to Drupal Queue, but it doesn't offer the same immediate-ish asynchronous execution of tasks that DataSync can.

#9

Drupal Queue is a direct backport of the Drupal 7.x Queuing system. Also it's interface is pluggable so you can use queuing systems like beanstalkd to do the heavy lifting.

If you use something like job_queue (not sure of data sync) then changing to Drupal Queues is a must.