public function UltimateCronBackgroundProcessLegacyLauncher::numberOfProcessesRunning in Ultimate Cron 7.2
Get the number of cron background processes currently running.
1 call to UltimateCronBackgroundProcessLegacyLauncher::numberOfProcessesRunning()
- UltimateCronBackgroundProcessLegacyLauncher::launchJobs in plugins/
ultimate_cron/ launcher/ background_process_legacy.class.php - Launch manager.
File
- plugins/
ultimate_cron/ launcher/ background_process_legacy.class.php, line 688 - Background Process 1.x launcher for Ultimate Cron.
Class
- UltimateCronBackgroundProcessLegacyLauncher
- Ultimate Cron launcher plugin class.
Code
public function numberOfProcessesRunning() {
$query = db_select('background_process', 'bp')
->condition('bp.handle', db_like('uc-') . '%', 'LIKE');
$query
->addExpression('COUNT(1)', 'processes');
$result = $query
->execute()
->fetchField();
return $result ? $result : 0;
}