setDescription('Resume scheduler started tasks jobs'); } protected function doExecute(InputInterface $input, OutputInterface $output) { if (false === $this->container['phraseanet.configuration']['main']['task-manager']['enabled']) { throw new RuntimeException('The use of the task manager is disabled on this instance.'); } $ret = 0; $this->container['task-manager.status']->start(); $output->writeln("Task manager configuration has been toggled on start."); $info = $this->container['task-manager.live-information']->getManager(); if (TaskManagerStatus::STATUS_STARTED !== $info['actual']) { $output->writeln(sprintf('Task manager is currently %s, please consider start it.', $info['actual'])); $ret = 1; } else { $output->writeln('Task manager is currently running.'); } return $ret; } }