lock = $lock; $this->chainQueue = $chainQueue; parent::__construct(); } /** * {@inheritdoc} */ protected function configure() { $this ->setName('cron:release') ->setDescription($this->trans('commands.cron.release.description')); } /** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $io = new DrupalStyle($input, $output); try { $this->lock->release('cron'); $io->info($this->trans('commands.cron.release.messages.released')); } catch (Exception $e) { $io->error($e->getMessage()); return 1; } $this->chainQueue->addCommand('cache:rebuild', ['cache' => 'all']); return 0; } }