added automation
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\Automation\AutomationEngine;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class RunAutomationsCommand extends Command
|
||||
{
|
||||
protected $signature = 'automations:run';
|
||||
|
||||
protected $description = 'اجرای اتوماسیونهای زماندار و صف تأخیر';
|
||||
|
||||
public function handle(AutomationEngine $engine): int
|
||||
{
|
||||
$engine->runDue();
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,11 @@ class Kernel extends ConsoleKernel
|
||||
->dailyAt('03:40')
|
||||
->name('pargar_requeue_wallet_docs_all')
|
||||
->withoutOverlapping(110);
|
||||
|
||||
$schedule->command('automations:run')
|
||||
->everyMinute()
|
||||
->name('automations_run')
|
||||
->withoutOverlapping(50);
|
||||
}
|
||||
|
||||
protected function commands()
|
||||
|
||||
Reference in New Issue
Block a user