/** * {@inheritdoc} * @see \Scalr\System\Zmq\Cron\AbstractTask::config() */ public function config() { $config = parent::config(); if ($config->daemon) { //Report a warning to the log trigger_error(sprintf("Demonized mode is not allowed for '%s' task. Forcing normal mode.", $this->name), E_USER_WARNING); //Forces normal mode $config->daemon = false; } return $config; }
/** * {@inheritdoc} * @see \Scalr\System\Zmq\Cron\AbstractTask::config() */ public function config() { $config = parent::config(); if ($config->daemon) { //Report a warning to log trigger_error(sprintf("Demonized mode is not allowed for '%s' job.", $this->name), E_USER_WARNING); //Forces normal mode $config->daemon = false; } if ($config->workers != 1) { //It cannot be performed through ZMQ MDP as execution time exceeds heartbeat trigger_error(sprintf("It is allowed only one worker for the '%s' job.", $this->name), E_USER_WARNING); $config->workers = 1; } return $config; }