function hosting_task_update_2 in Hosting 6.2
Same name and namespace in other branches
- 5 task/hosting_task.install \hosting_task_update_2()
- 7.4 task/hosting_task.install \hosting_task_update_2()
- 7.3 task/hosting_task.install \hosting_task_update_2()
Reset the task_status of all currently (according to us) in queue tasks
This will force them to be re-evaluated if the queue status doesn't match the task status
File
- task/
hosting_task.install, line 145
Code
function hosting_task_update_2() {
$ret = array();
variable_set('hosting_dispatch_enabled', FALSE);
// Put the queued items separately for a bit.
db_query("UPDATE {hosting_task_queue} SET status = 100 WHERE status = 0");
// Remove all the other items from the queue.
db_query("UPDATE {hosting_task_queue} SET status = 0 WHERE status <> 100");
// Add all the queued items back into the queue.
db_query("UPDATE {hosting_task_queue} SET status = 1 WHERE status = 100");
variable_set('hosting_dispatch_enabled', TRUE);
return $ret;
}