Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK-541] Automatic transcriptions now request status with exponential backoff #4976

Merged
merged 9 commits into from
Jun 18, 2024

Conversation

duvld
Copy link
Member

@duvld duvld commented Jun 10, 2024

Checklist

  1. If you've added code that should be tested, add tests
  2. If you've changed APIs, update (or create!) the documentation
  3. Ensure the tests pass
  4. Make sure that your code lints and that you've followed our coding style
  5. Write a title and, if necessary, a description of your work suitable for publishing in our release notes
  6. Mention any related issues in this repository (as #ISSUE) and in other repositories (as kobotoolbox/other#ISSUE)
  7. Open an issue in the docs if there are UI/UX changes

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 to utils.ts. To get around the circular dependency of importing envStore into utils.ts we now require the user to import envStore 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).

@duvld duvld changed the base branch from main to beta June 10, 2024 22:13
@magicznyleszek magicznyleszek self-assigned this Jun 11, 2024
@magicznyleszek magicznyleszek merged commit 2160052 into beta Jun 18, 2024
5 checks passed
@magicznyleszek magicznyleszek deleted the nlp-addons-task-541-exp-backoff branch June 18, 2024 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants