How can I not wait for response from API call?
I have a big batch of API calls (one depends on other) but application does not need the results. Just say "Facebook do this" and do not wait for response.
How can I not wait for a response?
I was involved in a project a while back where we implemented queuing for something similar to this. (The application was posting to the walls of around 150 pages as well as some other data collection.
Our solution was this:
We had a Queue table that was populated with Jobs. These were made up of the parameters, token and the particular Facebook API call. The table also had a status column that was either set to scheduled/success/fail, a response column and a couple of datetime columns, scheduled & sent.
A script that looked for scheduled jobs, then ran the API calls and collected the response was run by a cron job at an arbitrary interval.
The application itself could look at the Queue table and produce a report of what jobs had been run and their responses, as well as the upcoming scheduled jobs.