File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,8 @@ public function __construct(
6969 }
7070
7171 protected function run ($ argument ): void {
72- if (!isset ($ argument ['stage ' ])) {
73- // not executed in 25.0.0?!
74- $ argument ['stage ' ] = self ::STAGE_PREPARE ;
72+ if (!is_array ($ argument ) || !isset ($ argument ['stage ' ])) {
73+ throw new \Exception ('Job ' .self ::class.' called with wrong argument ' );
7574 }
7675
7776 switch ($ argument ['stage ' ]) {
@@ -99,10 +98,10 @@ protected function runPreparation(): void {
9998 $ userIds = $ result ->fetchAll (\PDO ::FETCH_COLUMN );
10099 $ this ->storeUserIdsToProcess ($ userIds );
101100 } catch (\Throwable $ t ) {
102- $ this ->jobList ->add (self ::class, self ::STAGE_PREPARE );
101+ $ this ->jobList ->add (self ::class, [ ' stage ' => self ::STAGE_PREPARE ] );
103102 throw $ t ;
104103 }
105- $ this ->jobList ->add (self ::class, self ::STAGE_EXECUTE );
104+ $ this ->jobList ->add (self ::class, [ ' stage ' => self ::STAGE_EXECUTE ] );
106105 }
107106
108107 /**
You can’t perform that action at this time.
0 commit comments