You are here

function drush_revision_scheduler_process in Revision scheduler 7

Drush command callback for revision-scheduler-process.

1 string reference to 'drush_revision_scheduler_process'
revision_scheduler_drush_command in ./revision_scheduler.drush.inc
Implements hook_drush_command().

File

./revision_scheduler.drush.inc, line 35
Drush integration for the Revision Scheduler module.

Code

function drush_revision_scheduler_process() {

  // Add any scheduled items to process to the queue.
  revision_scheduler_cron();
  if (!DrupalQueue::get('revision_scheduler', TRUE)
    ->numberOfItems()) {
    return;
  }

  // The process the items from the queue.
  if (module_exists('concurrent_queue')) {
    drush_invoke_process('@self', 'queue-run-concurrent', array(
      'revision_scheduler',
    ), array(
      'concurrency' => 1,
    ));
  }
  else {
    drush_invoke_process('@self', 'queue-run', array(
      'revision_scheduler',
    ));
  }
}