31 lines
797 B
PHP
31 lines
797 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Jobs\Payments\ArchivePaymentsJob;
|
|
use Illuminate\Console\Command;
|
|
|
|
final class PaymentsArchiveDispatch extends Command
|
|
{
|
|
protected $signature = 'payments:archive-dispatch
|
|
{--days=7}
|
|
{--timeout=15}
|
|
{--timeout_archive=60}
|
|
{--batch=500}';
|
|
|
|
protected $description = 'Dispatch archive job to queue (gc_payment_attempts/gc_pin_order/gc_pin_order_items).';
|
|
|
|
public function handle(): int
|
|
{
|
|
ArchivePaymentsJob::dispatch(
|
|
(int)$this->option('days'),
|
|
(int)$this->option('timeout'),
|
|
(int)$this->option('timeout_archive'),
|
|
(int)$this->option('batch'),
|
|
);
|
|
|
|
$this->info('ArchivePaymentsJob dispatched.');
|
|
return self::SUCCESS;
|
|
}
|
|
}
|