Import action trigger job after import

I want to trigger a laravel job after an import action completes. There can be hundreds of rows imported at a time. I don't care if the import completes with or without errors, but I do need to trigger a job post import. That job processes all the rows imported as a group.
FYI - I thought of just triggering the job and using the Unique job trait to ensure only one is actually ran. However there must be a cleaner way to do this
Solution:
Import dispatches an ImportCompleted event. You should be able to attach a listener to it.
Jump to solution
2 Replies
Solution
awcodes
awcodes4mo ago
Import dispatches an ImportCompleted event. You should be able to attach a listener to it.
darcy1368
darcy1368OP4mo ago
Thanks that worked, couldn't find it in the documentation. Appreciated
Want results from more Discord servers?
Add your server