private readonly EntityRepository
$productExportRepository,
private readonly MessageBusInterface
$messageBus ) { parent::
__construct($scheduledTaskRepository);
} public function run(): void
{ $salesChannelIds =
$this->
fetchSalesChannelIds();
foreach ($salesChannelIds as $salesChannelId) { $productExports =
$this->
fetchProductExports($salesChannelId);
if (\
count($productExports) === 0
) { continue;
} $now =
new \
DateTimeImmutable('now'
);
foreach ($productExports as $productExport) { if (!
$this->
shouldBeRun($productExport,
$now)) { continue;
}