Creation Event Chaining
dshoreman opened this issue · comments
Currently the project's app/redirect listeners are dumped in an array and they all get triggered at once on the saved
model event:
servidor/app/Projects/Application.php
Lines 68 to 69 in bdb9e1c
servidor/app/Projects/Redirect.php
Lines 40 to 41 in bdb9e1c
servidor/app/Providers/EventServiceProvider.php
Lines 18 to 28 in bdb9e1c
While there's nothing inherently wrong with that--creating a project still happens in order--it would be better if actions were queued individually, independent of the model's saved event.
We essentially need a single event (I think) that saved
would trigger. That event would be responsible for queuing any subsequent actions (jobs?) that need to happen.
TIL! Re jobs/actions, see spatie/laravel-queueable-action. Should make life a bit easier...