Skip to content

Commit 0820018

Browse files
Revert "Revert "Pass the limiter to the when & report callbacks (#56129)" (#5…" (#56187)
This reverts commit 59ca3d1.
1 parent 8c302e0 commit 0820018

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Illuminate/Queue/Middleware/ThrottlesExceptions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ public function handle($job, $next)
117117

118118
$this->limiter->clear($jobKey);
119119
} catch (Throwable $throwable) {
120-
if ($this->whenCallback && ! call_user_func($this->whenCallback, $throwable)) {
120+
if ($this->whenCallback && ! call_user_func($this->whenCallback, $throwable, $this->limiter)) {
121121
throw $throwable;
122122
}
123123

124-
if ($this->reportCallback && call_user_func($this->reportCallback, $throwable)) {
124+
if ($this->reportCallback && call_user_func($this->reportCallback, $throwable, $this->limiter)) {
125125
report($throwable);
126126
}
127127

src/Illuminate/Queue/Middleware/ThrottlesExceptionsWithRedis.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ public function handle($job, $next)
5050

5151
$this->limiter->clear();
5252
} catch (Throwable $throwable) {
53-
if ($this->whenCallback && ! call_user_func($this->whenCallback, $throwable)) {
53+
if ($this->whenCallback && ! call_user_func($this->whenCallback, $throwable, $this->limiter)) {
5454
throw $throwable;
5555
}
5656

57-
if ($this->reportCallback && call_user_func($this->reportCallback, $throwable)) {
57+
if ($this->reportCallback && call_user_func($this->reportCallback, $throwable, $this->limiter)) {
5858
report($throwable);
5959
}
6060

0 commit comments

Comments
 (0)