Skip to content

Commit bd7aaa8

Browse files
authored
Fix bug with RetryCommand (#35828)
1 parent b3ebb1b commit bd7aaa8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Illuminate/Queue/Console/RetryCommand.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Illuminate\Queue\Console;
44

5+
use DateTimeInterface;
56
use Illuminate\Console\Command;
67
use Illuminate\Support\Arr;
78

@@ -133,7 +134,11 @@ protected function refreshRetryUntil($payload)
133134
$instance = unserialize($payload['data']['command']);
134135

135136
if (is_object($instance) && method_exists($instance, 'retryUntil')) {
136-
$payload['retryUntil'] = $instance->retryUntil()->timestamp;
137+
$retryUntil = $instance->retryUntil();
138+
139+
$payload['retryUntil'] = $retryUntil instanceof DateTimeInterface
140+
? $retryUntil->getTimestamp()
141+
: $retryUntil;
137142
}
138143

139144
return json_encode($payload);

0 commit comments

Comments
 (0)