Skip to content

Commit 5e65f8c

Browse files
perf: check horizon.path instead of entire horizon config (#92)
Only check the specific config value needed instead of loading the entire horizon config array.
1 parent f2cee90 commit 5e65f8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Notification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function toMail($notifiable): MailMessage
3838
->line("Job class: {$this->event->job->resolveName()}")
3939
->line("Job body: {$this->event->job->getRawBody()}")
4040
->line("Exception: {$this->event->exception->getTraceAsString()}")
41-
->when(config('horizon') !== null, fn (MailMessage $mailMessage) => $mailMessage->action('View Error', url(config('horizon.path').'/failed/'.$this->event->job->getJobId())));
41+
->when(config('horizon.path') !== null, fn (MailMessage $mailMessage) => $mailMessage->action('View Error', url(config('horizon.path').'/failed/'.$this->event->job->getJobId())));
4242
}
4343

4444
public function toSlack(): SlackMessage

0 commit comments

Comments
 (0)