<?php

namespace App\Jobs;

use App\Jobs\Tasks\BrowseDFSForResearchTask;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class BrowseDFSForResearchJob implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    protected $serp_url_id;

    public $timeout = 60;

    /**
     * Create a new job instance.
     */
    public function __construct(int $serp_url_id)
    {
        $this->serp_url_id = $serp_url_id;
    }

    /**
     * Execute the job.
     */
    public function handle(): void
    {
        BrowseDFSForResearchTask::handle($this->serp_url_id);
    }
}
