public function getWorkerCommand($name, $env = null, $unescaped = false)
    {
        $defs = $this->workersList;
        if (!isset($defs[$name])) {
            throw new \Exception("No worker configuration for $name");
        }
        $workerDef = $defs[$name];
        if (empty($workerDef['queue_name']) || (isset($workerDef['options']) && !is_array($workerDef['options']))) {
            throw new \Exception("Bad worker configuration for $name");
        }
        $cmd = $this->getConsoleCommand($env, $unescaped) .
            " kaliop_queueing:consumer " . ($unescaped ? $workerDef['queue_name'] : escapeshellarg($workerDef['queue_name'])) .
            " --label=" . ($unescaped ? $name : escapeshellarg($name)) . " -w";
        if (isset($workerDef['options'])) {
            foreach ($workerDef['options'] as $name => $value) {
                $cmd .= ' ' . (strlen($name) == 1 ? '-' : '--') . $name . '=' . ($unescaped ? $value : escapeshellarg($value));
            }
        }
        return $cmd;
    }