We use the Twitter Ads API to support large brands in their Twitter campaign pulls. Recently our twitter jobs pending for over 1.5h. We implemented our connection using the Asych endpoints best practices (https://dev.twitter.com/ads/analytics).
At a high level we take the following steps when making an asych call:
- split promotedTweetIds into chunks of 20 because the tweetIds parameter supports up to only 20 tweets
- create an asych jobs
- retry jobs if they fail/timeout
- timeout any pending twitter jobs that havent change status in ~1.5h.
Some (not all and not all the time) jobs hit our timeout and we have to fail the request. We just upped that limit to ~3h but we are not confident that this will fix the issues, as most successful jobs tend to finish pretty quickly (15-30mins).
Could we get some guidance on best practices?