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
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:Jump to solution
Import dispatches an ImportCompleted event. You should be able to attach a listener to it.
2 Replies