New_Micro_Learning/backend/app/Modules/System/Application/QueueHeartbeat.php

21 خطوط
535 B
PHP

<?php
namespace App\Modules\System\Application;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Cache;
final class QueueHeartbeat implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function handle(): void
{
Cache::put('system:queue-heartbeat', now(), now()->addMinutes(5));
}
}