<?php

namespace App\Console\Commands;

use App\Services\System\SystemHealthService;
use Illuminate\Console\Command;

class RemoteMatchHeartbeatCommand extends Command
{
    protected $signature = 'remotematch:heartbeat';

    protected $description = 'Record a scheduler heartbeat used by the RemoteMatch system health check.';

    public function handle(SystemHealthService $health): int
    {
        $health->recordSchedulerHeartbeat();

        $this->info('RemoteMatch scheduler heartbeat recorded.');

        return self::SUCCESS;
    }
}
