1
0
Fork 0
mirror of https://github.com/archtechx/jobpipeline.git synced 2025-12-16 06:44:04 +00:00

fix: just handle failures in closures correctly

This commit is contained in:
jaulz 2024-10-31 08:46:43 +00:00
parent ebeef52b4b
commit 009c814831
2 changed files with 15 additions and 35 deletions

View file

@ -67,7 +67,7 @@ class JobPipeline implements ShouldQueue
}
try {
$result = app()->call($job, $this->passable);
$result = app()->call($job);
} catch (Throwable $exception) {
if (is_array($job) && method_exists(get_class($job[0]), 'failed')) {
call_user_func_array([$job[0], 'failed'], [$exception]);