setName('clear-queue-failures') ->setAliases(['clearqueue']) ->addOption( 'env', 'e', InputOption::VALUE_OPTIONAL, 'The environment to trigger a specific configuration. For example: localhost, mysite.dev, www.mysite.com' ) ->setDescription('Clears any queue failures that have accumulated') ->setHelp('The clear-queue-failures command clears any queue failures that have accumulated'); } /** * @return int|null|void */ protected function serve() { // TODO: remove when requiring Grav 1.7+ if (method_exists($this, 'initializeGrav')) { $this->initializeGrav(); } $grav = Grav::instance(); $this->output->writeln(''); $this->output->writeln('Current Configuration:'); $this->output->writeln(''); dump($grav['config']->get('plugins.email')); $this->output->writeln(''); require_once __DIR__ . '/../vendor/autoload.php'; $output = Email::clearQueueFailures(); $this->output->writeln('' . $output . ''); } }