Async Analytics how to improve response time?


#1

Hi all,

When I call “GET /1/stats/accounts/:account_id” a lot of time the response is “PROCESSING”.

most of my call are successful only after the 3rd call, both when I wait 20ms between calls or wait 200ms between calls - even if I add a specific job_id.

My questions are:

  1. Could I estimate when an async job is finished?
  2. Shouldn’t adding a specific job_id make the response faster?
  3. Do you have any recommendations for a situation when I’m waiting for the response while it’s still processing?

Thanks,
Alon


#2

To answer your questions:

  1. There is currently no way to estimate when an async job is finished. You will need to poll the GET jobs endpoint with a job id (or list of job id’s) until you receive a “SUCCESS” status from the response.

  2. The duration to get the output of a job is independent of passing in specific job id’s or polling frequency.

  3. Generally, async jobs can take up to 60 minutes to run although most jobs are completed within a minute or two. I’d recommend polling the endpoint until you hit that limit, and if you still don’t see a response, you can submit a new job.

Thanks,
Tushar