Scalr\System\Zmq\Cron\Task\Rotate::config PHP Метод

config() публичный Метод

См. также: Scalr\System\Zmq\Cron\AbstractTask::config()
public 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 is more than heartbeat
            trigger_error(sprintf("It is allowed only one worker for the '%s' job.", $this->name), E_USER_WARNING);
            $config->workers = 1;
        }
        return $config;
    }