<?php

declare(strict_types=1);

namespace App\Framework\Performance\Jobs;

use App\Framework\Jobs\Job;
use App\Framework\Performance\PerformanceDatabaseWorker;
use App\Framework\Core\Container;

class ProcessPerformanceLogsJob extends Job
{
    private string $logFile;

    public function __construct(string $logFile)
    {
        $this->logFile = $logFile;
    }

    public function handle(Container $container): void
    {
        $worker = $container->get(PerformanceDatabaseWorker::class);
        $worker->processLogFile($this->logFile);
    }

    public function getLogFile(): string
    {
        return $this->logFile;
    }
}
