samvera-labs / active_encode

Declare encode job classes that can be run by a variety of encoding services
Other
6 stars 8 forks source link

Retry MediaConvert operations using retriable #84

Open mbklein opened 3 years ago

mbklein commented 3 years ago

AWS MediaConvert has rate limits that are easy to run up against when using ActiveEncode. These are mostly harmless – they just raise Aws::MediaConvert::Errors::TooManyRequestsException and the job goes back in the queue. This PR uses the retriable gem (already in use within the Avalon/Hyrax/Samvera ecosystem as a second-tier dependency) to retry MediaConvert requests three times with exponential backoff and random jitter.