You are here

function background_process_ass_cron_alter in Background Process 8

Same name and namespace in other branches
  1. 6 background_process_ass/background_process_ass.module \background_process_ass_cron_alter()
  2. 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 43
Implements Background Process Ass Module. @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;
  $handle_prefix = \Drupal::config('ultimate_cron.settings')
    ->get('bypass_transactional_safe_connection');
  if ($process = background_process_get_process($handle_prefix . 'background_process_ass_cron')) {
    if ($process->start + 30 < time()) {
      background_process_unlock($process->handle, t('Self unlocking stale lock'));
    }
  }
}