minute = $minute; } /** * Execute the job. * * @return void */ public function handle(): void { $host = new Host(); if (app()->environment() != 'local') { $host = $host->where('minute_at', $this->minute); } $host->whereIn('status', ['running', 'stopped'])->with('user')->chunk(500, function ($hosts) { foreach ($hosts as $host) { dispatch(new RealHostCostJob($host, $host->getPrice()))->onQueue('host-cost'); } }); } }