1
0
Fork 0
mirror of https://github.com/archtechx/jobpipeline.git synced 2025-12-12 10:54:05 +00:00

Mention returning false

This commit is contained in:
Samuel Štancl 2020-11-12 19:46:35 +01:00 committed by GitHub
parent 86873515ae
commit 9a896b730c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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. 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.