From eeedf9f7cdac136d7c1aba921d491a7fbb57e2d3 Mon Sep 17 00:00:00 2001 From: Zdeno Kuzmany Date: Mon, 20 Feb 2023 06:42:41 +0100 Subject: [PATCH] Add support to process all scheduled exports --- Command/CustomItemsScheduledExportCommand.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Command/CustomItemsScheduledExportCommand.php b/Command/CustomItemsScheduledExportCommand.php index 74e4e74a5..c3eeae29a 100644 --- a/Command/CustomItemsScheduledExportCommand.php +++ b/Command/CustomItemsScheduledExportCommand.php @@ -52,8 +52,13 @@ protected function configure(): void protected function execute(InputInterface $input, OutputInterface $output): int { - $ids = $this->formatterHelper->simpleCsvToArray($input->getOption('ids'), 'int'); - $customItemExportSchedulers = $this->customItemExportSchedulerModel->getRepository()->findBy(['id' => $ids]); + if ($ids = $input->getOption('ids')) { + $ids = $this->formatterHelper->simpleCsvToArray($ids, 'int'); + $customItemExportSchedulers = $this->customItemExportSchedulerModel->getRepository()->findBy(['id' => $ids]); + } else { + $customItemExportSchedulers = $this->customItemExportSchedulerModel->getRepository()->getEntities(); + } + $count = 0; foreach ($customItemExportSchedulers as $customItemExportScheduler) {