ultimatepos/Modules/Crm/Console/ExpireCallQueueLocks.php

22 lines
510 B
PHP

<?php
namespace Modules\Crm\Console;
use Illuminate\Console\Command;
use Modules\Crm\Services\CallQueueService;
class ExpireCallQueueLocks extends Command
{
protected $signature = 'pos:expireCallQueueLocks';
protected $description = 'Expire stale telemarketing call queue locks';
public function handle(CallQueueService $callQueueService): int
{
$count = $callQueueService->expireStaleLocks();
$this->info("Expired {$count} stale queue locks.");
return 0;
}
}