Some checks failed
Telegram Mini App Shop Builder / Compute version metadata (push) Has been cancelled
Telegram Mini App Shop Builder / Run Frontend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run Backend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Has been cancelled
Telegram Mini App Shop Builder / Build module. (push) Has been cancelled
Telegram Mini App Shop Builder / release (push) Has been cancelled
30 lines
920 B
PHP
Executable File
30 lines
920 B
PHP
Executable File
<?php
|
|
|
|
namespace Console\Commands;
|
|
|
|
use Bastion\ScheduledTasks\AcmeShopPulseSendEventsTask;
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
class PulseSendEventsCommand extends AcmeShopCommand
|
|
{
|
|
protected static $defaultName = 'pulse:send';
|
|
protected static $defaultDescription = 'Manually send pulse events ignoring schedule.';
|
|
private AcmeShopPulseSendEventsTask $megaPayPulseSendEventsTask;
|
|
|
|
public function __construct(AcmeShopPulseSendEventsTask $megaPayPulseSendEventsTask)
|
|
{
|
|
parent::__construct();
|
|
|
|
$this->megaPayPulseSendEventsTask = $megaPayPulseSendEventsTask;
|
|
}
|
|
|
|
protected function execute(InputInterface $input, OutputInterface $output): int
|
|
{
|
|
$output->writeln('<info>Sending Pulse events.</info>');
|
|
$this->megaPayPulseSendEventsTask->execute();
|
|
|
|
return self::SUCCESS;
|
|
}
|
|
}
|