X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FCron%2FReleaseCommand.php;fp=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FCron%2FReleaseCommand.php;h=2fa9541ad813332b3176858861f51b0cafc64154;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/drupal/console/src/Command/Cron/ReleaseCommand.php b/vendor/drupal/console/src/Command/Cron/ReleaseCommand.php new file mode 100644 index 000000000..2fa9541ad --- /dev/null +++ b/vendor/drupal/console/src/Command/Cron/ReleaseCommand.php @@ -0,0 +1,79 @@ +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; + } +}