/** * Call back for when jobs are started */ public function job_start($handle, $job, $args) { $this->job_execution_count++; if ( ! empty($this->config["max_runs_per_worker"]) ) { $message = sprintf('(%s) Starting Job (%d/%d): %s', $handle, $this->job_execution_count, $this->config["max_runs_per_worker"], $job); $this->log($message, GearmanManager::LOG_LEVEL_WORKER_INFO); } else { $this->log("($handle) Starting Job: $job", GearmanManager::LOG_LEVEL_WORKER_INFO); } $this->log("($handle) Workload: ".json_encode($args), GearmanManager::LOG_LEVEL_DEBUG); self::$LOG = array(); }
/** * Call back for when jobs are started */ public function job_start($handle, $job, $args) { $this->log("({$handle}) Starting Job: {$job}", GearmanManager::LOG_LEVEL_WORKER_INFO); $this->log("({$handle}) Workload: " . json_encode($args), GearmanManager::LOG_LEVEL_DEBUG); self::$LOG = array(); }