File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,10 @@ public function add($jobs)
170170 $ count += count ($ job );
171171
172172 return with ($ this ->prepareBatchedChain ($ job ), function ($ chain ) {
173- return $ chain ->first ()->chain ($ chain ->slice (1 )->values ()->all ());
173+ return $ chain ->first ()
174+ ->allOnQueue ($ this ->options ['queue ' ] ?? null )
175+ ->allOnConnection ($ this ->options ['connection ' ] ?? null )
176+ ->chain ($ chain ->slice (1 )->values ()->all ());
174177 });
175178 } else {
176179 $ job ->withBatchId ($ this ->id );
Original file line number Diff line number Diff line change @@ -332,6 +332,7 @@ public function test_chain_can_be_added_to_batch()
332332
333333 $ this ->assertEquals (3 , $ batch ->totalJobs );
334334 $ this ->assertEquals (3 , $ batch ->pendingJobs );
335+ $ this ->assertEquals ('test-queue ' , $ chainHeadJob ->chainQueue );
335336 $ this ->assertTrue (is_string ($ chainHeadJob ->batchId ));
336337 $ this ->assertTrue (is_string ($ secondJob ->batchId ));
337338 $ this ->assertTrue (is_string ($ thirdJob ->batchId ));
You can’t perform that action at this time.
0 commit comments