Sorry for the potentially newbie question as i’m only 3 weeks into my laravel journey.
I’m working on a admin tool which provides the ability to interface with other services and perform bulk tasks via their API’s. Performing these tasks requires running multiple API queries against these external platforms while performing some logic on the data that’s returned and then making decisions on what API query needs to run next while tracking the over all process in a single log file.
As a simple example one job might use one API query to get a list of users on a system, then for each user that’s returned call another API to get additional information for each user. Additional for the initial API to get the list of users there may be pagination involved which needs to be tracked. In the end the job should provide a CSV file with a list of all users including the detailed information.
I have been able to get this process to work by creating a single job that performs all of the API queries and logic inline which is working most of the time. however if one of the API queries experiences an issue the whole job fails.
it’s my understanding that I should be running each API query as a job so that i can take advantage of the retry and back off functionality native to jobs however I haven’t been able to figure out how to in effect nest jobs and have them processed properly so that they entire function can operate in the background.
If someone could point me in the correct direction that would be much appreciated. Should I be looking at nesting chains in batches or using the batch then method or is there something else entirely.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community