function hosting_run_queue in Hosting 5
Same name and namespace in other branches
- 6.2 hosting.queues.inc \hosting_run_queue()
- 7.4 hosting.queues.inc \hosting_run_queue()
- 7.3 hosting.queues.inc \hosting_run_queue()
Run a queue specified by hook_hosting_queues
Run an instance of a queue processor. This function contains all the book keeping functionality needed to ensure that the queues are running as scheduled.
1 string reference to 'hosting_run_queue'
File
- ./
hosting.queues.inc, line 131
Code
function hosting_run_queue() {
$cmd = drush_get_command();
$queue = $cmd['queue'];
$count = drush_get_option(array(
'i',
'items',
), 5);
# process a default of 5 items at a time.
variable_set('hosting_queue_' . $queue . '_last_run', $t = mktime());
variable_set('hosting_queue_' . $queue . '_running', $t);
$func = "hosting_" . $queue . "_queue";
if (function_exists($func)) {
$func($count);
}
variable_del('hosting_queue_' . $queue . '_running');
}