d

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.

15 St Margarets, NY 10033
(+381) 11 123 4567
ouroffice@aware.com

 

KMF

Laravel Job Chainer | Laravel News

Laravel Job Chainer is a package to chain Laravel jobs without having to glue them together with a starting job. Job Chainer makes it possible to dynamically chain jobs using the provided JobChainer class:

1// Typical job chaining

2ProcessPodcast::withChain([

3 new OptimizePodcast,

4 new ReleasePodcast($argA, $argB)

5])->dispatch($arg1);

6 

7 

8// With Job Chainer

9$chain = new JobChainer;

10 

11$chain->add(ProcessPodcast::class, $arg1);

12$chain->add(OptimizePodcast::class);

13$chain->add(ReleasePodcast::class, $argA, $argB);

14 

15$chain->dispatch();

This package makes it convenient to dynamically add jobs without prior knowledge about which job should be first. One use-case could be if you wanted to provide a UI for users to have the ability to customize which jobs steps should run (or not run) for a given job pipeline.

You can learn more about this package, get full installation instructions, and view the source code on GitHub.

For further reading on job chaining, check out Laravel’s queue job chaining documentation.

Credit: Source link

Previous Next
Close
Test Caption
Test Description goes like this