File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/Illuminate/Queue/Console Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 44
55use DateTimeInterface ;
66use Illuminate \Console \Command ;
7+ use Illuminate \Contracts \Encryption \Encrypter ;
78use Illuminate \Support \Arr ;
9+ use Illuminate \Support \Str ;
10+ use RuntimeException ;
811
912class RetryCommand extends Command
1013{
@@ -131,7 +134,15 @@ protected function refreshRetryUntil($payload)
131134 return json_encode ($ payload );
132135 }
133136
134- $ instance = unserialize ($ payload ['data ' ]['command ' ]);
137+ if (Str::startsWith ($ payload ['data ' ]['command ' ], 'O: ' )) {
138+ $ instance = unserialize ($ payload ['data ' ]['command ' ]);
139+ } elseif ($ this ->laravel ->bound (Encrypter::class)) {
140+ $ instance = unserialize ($ this ->laravel ->make (Encrypter::class)->decrypt ($ payload ['data ' ]['command ' ]));
141+ }
142+
143+ if (! isset ($ instance )) {
144+ throw new RuntimeException ('Unable to extract job payload. ' );
145+ }
135146
136147 if (is_object ($ instance ) && method_exists ($ instance , 'retryUntil ' )) {
137148 $ retryUntil = $ instance ->retryUntil ();
You can’t perform that action at this time.
0 commit comments