[TASK-541] Automatic transcriptions now request status with exponential backoff #4976
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Description
Before we sent requests to check on the status of an automatic transcription every 5 seconds on repeat. We now do it with exponential backoff.
Notes
The function responsible for exponential backoff has been refactored out of
exportFetcher.tsx
toutils.ts
. To get around the circular dependency of importingenvStore
intoutils.ts
we now require the user to importenvStore
along with the function and pass down the min/max values that way.The timing of the backoff should probably be adjusted in the future. Most transcription would not have any significant updates when the expo backoff is still firing faster (when it's 2, 4, 8 seconds in).