Download the PHP package orrison/laravel-are-we-there-yet without Composer
On this page you can find all versions of the php package orrison/laravel-are-we-there-yet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download orrison/laravel-are-we-there-yet
More information about orrison/laravel-are-we-there-yet
Files in orrison/laravel-are-we-there-yet
Package laravel-are-we-there-yet
Short Description Track related jobs and fire a closure when they have all completed
License GPL-3.0-or-later
Informations about the package laravel-are-we-there-yet
Are We There Yet?
Easy to use helper method to dispatch a list of jobs and job chains that, upon completion of all of them, trigger one last final job. Often we dispatch jobs that can run in parallel but that once all complete require something else to be done.
With the parallelDispatch
helper method you can dispatch a list of jobs AND chained jobs that will fire your defined "completion job" once they have all been completed successfully.
Installation & Setup:
Install via composer using the following command:
Two tables are required for the tracking awty_goals
and awty_tasks
. They can be added by running a migration after installation.
After the package and tables are setup you may now dispatch a cluster of jobs via parallelDispatch
that once all completed will trigger the "completion job".
All jobs included in the cluster MUST have the Trackable
trait. The completion job does NOT require the trait.
Examples:
Running a list of jobs in parallel
SomeJobToBeRunAfter
will be run once they are all completed.
Running a list of jobs including a job chain
Jobs in the chain can also be dispatch by including a sub array of job objects in the main $jobList
. The will be chained in the order they are listed.
In the above example JobOne
, JobTwo
, and chainedJobOne
will be dispatched immediately. But chainedJobTwo
and any others in that array will be chained to chainedJobOne
and will only complete in the sequential order they are listed.
Based on Job Tracking from: https://github.com/rafter-platform/rafter