You are here

public function UltimateCronBackgroundProcessLegacyLauncher::launchPoorman in Ultimate Cron 7.2

Poorman launcher.

File

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

Class

UltimateCronBackgroundProcessLegacyLauncher
Ultimate Cron launcher plugin class.

Code

public function launchPoorman() {
  $settings = $this
    ->getDefaultSettings();
  $class = _ultimate_cron_get_class('lock');
  if ($lock_id = $class::lock('ultimate_cron_poorman_bgpl', 60)) {
    $process = new BackgroundProcess();
    $process->uid = 0;
    $process->service_group = $settings['poorman_service_group'];
    $process
      ->start(array(
      get_class($this),
      'poormanLauncher',
    ), array(
      $lock_id,
    ));
    $class::persist($lock_id);
  }
}