handle($this->userId, $this->updNumber, $this->year); Log::info('ExportMafRegistry job done!'); event(new SendWebSocketMessageEvent('Реестр на оплату сформирован!', $this->userId, ['success' => true, 'link' => $link])); } catch (Throwable $e) { $this->notifyFailure($e); } } public function failed(Throwable $e): void { $this->notifyFailure($e); } private function notifyFailure(Throwable $e): void { Log::error('ExportMafRegistry job failed.', [ 'user_id' => $this->userId, 'upd_number' => $this->updNumber, 'year' => $this->year, 'exception' => $e, ]); event(new SendWebSocketMessageEvent( 'Ошибка формирования реестра на оплату! ' . $e->getMessage(), $this->userId, ['error' => $e->getMessage()] )); } }