You are here

public function UltimateCronBackgroundProcessLegacyLauncher::unlock in Ultimate Cron 7.2

Unlock background process.

Overrides UltimateCronLauncher::unlock

1 call to UltimateCronBackgroundProcessLegacyLauncher::unlock()
UltimateCronBackgroundProcessLegacyLauncher::launch in plugins/ultimate_cron/launcher/background_process_legacy.class.php
Background Process launch.

File

plugins/ultimate_cron/launcher/background_process_legacy.class.php, line 265
Background Process 1.x launcher for Ultimate Cron.

Class

UltimateCronBackgroundProcessLegacyLauncher
Ultimate Cron launcher plugin class.

Code

public function unlock($lock_id, $manual = FALSE) {
  if (!preg_match('/(.*):bgpl.*/', $lock_id, $matches)) {
    watchdog('bgpl_launcher', 'Invalid lock id @lock_id', array(
      '@lock_id' => $lock_id,
    ), WATCHDOG_ERROR);
    return FALSE;
  }
  $job_name = $matches[1];
  $handle = 'uc-' . $job_name;
  if ($manual) {
    $job = _ultimate_cron_job_load($job_name);
    $job
      ->sendSignal('background_process_legacy_dont_log');
  }
  return background_process_unlock($handle);
}