1
0
Fork 0
mirror of https://github.com/archtechx/jobpipeline.git synced 2025-12-12 06:44:03 +00:00

Merge branch 'master' of github.com:stancl/jobpipeline

This commit is contained in:
Samuel Štancl 2020-11-15 16:11:12 +01:00
commit 906caa0872

View file

@ -86,3 +86,5 @@ Event::listen(TenantCreated::class, JobPipeline::make([
```
Note that you can use job pipelines even for converting single jobs to event listeners. That's useful if you have some logic in job classes and don't want to create listener classes just to be able to run these jobs as a result of an event being fired.
Tip: Returning `false` from a job cancels the execution of all following jobs in the pipeline. This can be useful to cancel a job pipeline that creates, migrates, and seeds databases if the create database job exists (e.g. because it detects that a database already exists). So it can be good to separate jobs into multiple pipelines, so that each logical category of jobs can be stopped individually.