Choose the pool

@param InputInterface  $input  Input interface
@param OutputInterface $output Output interface

@see Command
@return mixed
2805
protected function interact(InputInterface $input, OutputInterface $output)
    {
        if (!$input->getArgument('pool')) {
            $pool = (new InteractHelper())->askForPool($this, $input, $output);
            $input->setArgument('pool', $pool);
        }
    }
234391
protected function execute(InputInterface $input, OutputInterface $output): int
    {
        $pipeLine = $this->pipeline;
        $pipeLine($input->getOptions());

        return 0;
    }
561848
protected function execute(InputInterface $input, OutputInterface $output)
    {
        if (!($this->lock())) {
            $output->writeln('The command is already running in another process.');

            return 0;
        }

        $producer = $this->getContainer()->get('enqueue.producer');

        // @todo iterate through all instead of limiting to 500
        $queueItems = $this->queueItemRepository->findBy([
            'status' => QueueItem::STATUS_PENDING,
        ], [], 500);

        foreach ($queueItems as $queueItem) {
            $queueItem->setStatus(QueueItem::STATUS_PROCESSING);
            $producer->sendEvent($queueItem->getType(), $queueItem->getIdentifier());

            $this->queueItemRepository->save($queueItem);
        }

        return 0;
    }
153146
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $method = method_exists($this, 'process') ? 'process' : 'handle';

        return $this->{$method}();
    }
623294
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        $outputFile = null;
        if ($file = $input->getOption('output-file')) {
            $outputFile = $file;
        }
        $this->service($input->getArgument($this->argument), $outputFile);
    }
113850
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $queueType = $input->getOption('queue-type');
        $notifyEmail = $input->getOption('notify-email');

        $manager = $this->getManager();

        if ($notifyEmail !== false) {
            $notify = new \Expose\Notify\Email();
            $notify->setToAddress($notifyEmail);
            $manager->setNotify($notify);
        }

        if ($queueType !== false) {
            $queueConnect = $input->getOption('queue-connect');
            if ($queueConnect === false) {
                $output->writeln('<error>Queue connection string not provided</error>');
                return;
            }
            // make the queue object with the right adapter
            $queueClass = '\\Expose\\Queue\\'.ucwords(strtolower($queueType));
            if (!class_exists($queueClass)) {
                $output->writeln('<error>Invalid queue type "'.$queueType.'"</error>');
                return;
            }
            $queue = new $queueClass();

            $adapter = $this->buildAdapter($queueType, $queueConnect, $queue->getDatabase());
            if ($adapter === false) {
                $output->writeln('<error>Invalid connection string</error>');
                return;
            }
            $queue->setAdapter($adapter);

        } else {
            $output->writeln('<error>Queue type not defined</error>');
            return;
        }
        $this->setQueue($queue);

        if ($input->getOption('list') !== false) {
            $output->writeln('<info>Current Queue Items Pending</info>');
            $this->listQueue($manager, $queue);
            return true;
        }

        // by default process the current queue
        $reports = $this->processQueue($output);
        if (count($reports) == 0) {
            return;
        }

        $exportFile = $input->getOption('export-file');
        if ($exportFile !== false) {
            $output->writeln('<info>Outputting results to file '.$exportFile.'</info>');
            file_put_contents(
                $exportFile,
                '['.date('m.d.Y H:i:s').'] '.json_encode($reports),
                FILE_APPEND
            );
        } else {
            echo json_encode($reports);
        }
    }
1138568
protected function execute(InputInterface $input, OutputInterface $output)
    {
        if ($siteId = $input->getOption('siteId')) {
            $site = $this->getContainer()->get('open_orchestra_model.repository.site')->findOneBySiteId($siteId);
            if ($site) {
                $this->publishElements($site, $output);
            } else {
                $output->writeln("<error>No website found with siteId " . $siteId . ".</error>");

                return 1;
            }
        } else {
            $siteCollection = $this->getContainer()->get('open_orchestra_model.repository.site')->findByDeleted(false);
            if ($siteCollection) {
                foreach ($siteCollection as $site) {
                    $this->publishElements($site, $output);
                }
            }
        }

        $output->writeln("\n<info>Done.</info>");

        return 0;
    }
513771
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $seed = $input->getArgument('seed');

        $seedPath = base_path().'/database/seeds';
        $file = $seedPath.'/'.$seed.'.php';

        if (file_exists($file)) {
            require_once $file;
            $class = '\\'.$seed;
            $c = new $class();
            $c->run();
        } else {
            $output->writeln("<error>$seed seed does not exist!</error>");
        }
    }
1042203
protected function downloadFromCrowdin(InputInterface $input, OutputInterface $output)
    {
        $command = $this->getApplication()->find('crowdin:api:download');
        $arguments = array(
            'command' => 'crowdin:api:download',
            '--path' => $input->getOption('path'),
            '--language' => $input->getOption('language'),
        );
        $input = new ArrayInput($arguments);

        return $command->run($input, $output);
    }
489985
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $finder     = new Finder();
        $filesystem = new Filesystem();
        $filesystem->remove($finder->directories()->in($this->getLanguageBasePath()));
    }
13054
protected function getProgramOptions(
        InputInterface $input,
        OutputInterface $output
    ) {
        $opts = array();

        foreach ($this->getDefinition()->getOptions() as $o) {
            $name = $o->getName();
            if (! array_key_exists($name, $this->programOptions )) {
                continue;
            }
            $value = $input->getOption($name);
            if ($o->acceptValue() && $value !== null) {
                $opts[$this->programOptions[$name]] = $value;
            } else if (! $o->acceptValue() && $value === true) {
                $opts[] = $this->programOptions[$name];
            }
        }

        return array_merge(
            $opts,
            $this->getVerbosityOptions($output->getVerbosity())
        );
    }
1132827
protected function execute(InputInterface $input, OutputInterface $output) : int
    {
        parent::execute($input, $output);

        $this->queue->consume(function (Message $message) {
            return $this->consumeCallback($message);
        });

        return $this->sendExitCode();
    }
1225865
public function doRun(InputInterface $input, OutputInterface $output)
    {

        $ioFactory = ConsoleIOFactory::buildDefault($input, $output, $this->getHelperSet());
        $this->io = $ioFactory->get();

        return parent::doRun($input, $output);
    }
391571
protected function execute(InputInterface $input, OutputInterface $output)
    {
        parent::execute($input, $output);

        $info = $this
            ->getSession()
            ->getInspector()
            ->getSchemaRelations($this->fetchSchemaOid()
        );
        $this->formatOutput($output, $info);
    }
824964
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $headerCommand = new HeaderCommand();
        $sortCommand = new UseSortCommand();
        $filesystem = new Filesystem();

        foreach (RootDirectories::getEnforceable() as $directory) {
            if ($filesystem->exists($directory) && is_dir($directory)) {
                $formatInput = [
                    'path' => $directory,
                ];

                if ($input->getOption('dry-run')) {
                    $formatInput['--dry-run'] = true;
                }

                $output->writeln('<comment>' . $directory . '</comment>');
                $headerCommand->run(new ArrayInput($formatInput), $output);
                $sortCommand->run(new ArrayInput($formatInput), $output);
            }
        }

        return 0;
    }
765115
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $container = $this->getContainer();
        $configBuilder = $container->get('admin.configuration.configbuilder');
        $pool = $container->get('admin.configuration.pool');
        foreach ($pool->getConfigurations() as $id => $attributes) {
            $config = $container->get($id);
            $config->build($configBuilder);
        }
    }
342961
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->cacheService->system()->clear();
        $this->cacheService->user()->clear();
        $output->writeln('Done!');
        return null;
    }