function background_process_dispatcher_queue in Background Process 7.2
Dispatcher for queue
1 string reference to 'background_process_dispatcher_queue'
- background_process_background_process_dispatcher_info in ./
background_process.module - Implements background_process_dispatcher_info().
File
- ./
background_process.dispatchers.inc, line 96
Code
function background_process_dispatcher_queue($process) {
$service_hosts = background_process_get_service_hosts();
$service_host = $service_hosts[$process
->getServiceHost()];
$queue = DrupalQueue::get($service_host['queue']);
// What to do about transactions here?
// If queue processing is requested before THIS request is over,
// the item might not be available to the cron worker.
// 1.) Use another db connection instead of target, just like in 1.x?
// 2.) Use a specific queue class?
// 3.) Keep it simple. Queues are used for "whenever possible processing".
$queue
->createItem($process
->getPID());
}