I have created a chain of deployment jobs in Laravel following the documentation:
https://laravel.com/docs/5.6/queues#job-chaining
From the docs (similar to my code):
ProcessPodcast::withChain([
new OptimizePodcast,
new ReleasePodcast
])->dispatch();
Is there any way to track whether the job chain has started and finished completely?
I guess a possibility would to always start the chain with a beforeDeployment
job and a afterDeployment
job. Since the chain gets broken when an error happens and the afterDeployment
will not be reached, this seems feasible.
Any thoughts on taking this approach or is there something easier to be done?
I guess my approach would allow me to set a listener like so:
https://laravel.com/docs/5.6/queues#job-events
Cheers!