function background_process_ass_cron_alter in Background Process 6
Same name and namespace in other branches
- 8 background_process_ass/background_process_ass.module \background_process_ass_cron_alter()
- 7 background_process_ass/background_process_ass.module \background_process_ass_cron_alter()
Implements hook_cron_alter().
File
- background_process_ass/
background_process_ass.module, line 58 - @todo Implement admin interface. @todo Fix runtime check of running process.
Code
function background_process_ass_cron_alter(&$items) {
$items['background_process_ass_cron']['override_congestion_protection'] = TRUE;
// Unlock background if too old.
// @todo Move to some access handler or pre-execute?
if ($process = background_process_get_process('uc:background_process_ass_cron')) {
if ($process->start + 30 < time()) {
background_process_unlock($process->handle, t('Self unlocking stale lock'));
}
}
}