kpi is the (frontend) server for KoboToolbox. It includes an API for users to access data and manage their forms, question library, sharing settings, create reports, and export data.
[ ] If you've added code that should be tested, add tests
[ ] If you've changed APIs, update (or create!) the documentation
[ ] Ensure the tests pass
[x] Make sure that your code lints and that you've followed our coding style
[x] Write a title and, if necessary, a description of your work suitable for publishing in our release notes
[x] Mention any related issues in this repository (as #ISSUE) and in other repositories (as kobotoolbox/other#ISSUE)
[ ] 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).
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).