mirror of
https://github.com/ericasch6/scrum-poker-internal.git
synced 2026-10-13 23:32:09 +00:00
23 lines
461 B
PHP
23 lines
461 B
PHP
<?php
|
|
|
|
namespace App\Jobs;
|
|
|
|
use App\Models\Player;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Queue\Queueable;
|
|
|
|
class MarkInactivePlayers implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
public function handle(): void
|
|
{
|
|
Player::query()
|
|
->whereNull('inactive_at')
|
|
->where('last_seen_at', '<=', now()->subHour())
|
|
->update([
|
|
'inactive_at' => now(),
|
|
]);
|
|
}
|
|
}
|