Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

feat(scanner): immediately refresh match on scan #434

Merged
merged 1 commit into from
Jun 12, 2024
Merged

Conversation

LarsSelbekk
Copy link
Contributor

Improve the time from scanning until the match visually updating by
immediately refreshing from the API on succesful scan. Would be even
faster to optimistically update the local cache of the date, but that's
harder and not really necessary.
Also rate limited the API transfer call to 4x per second as the API did
not handle races well, leading to some cases of multiple customerItems
active at the same time for one item, which caused a "not active" error
in the scanner as number active == 1 is an assert in the API.

@LarsSelbekk LarsSelbekk added the enhancement New feature or request label Jun 12, 2024
@LarsSelbekk LarsSelbekk self-assigned this Jun 12, 2024
Copy link

vercel bot commented Jun 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bl-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 12, 2024 0:29am

Improve the time from scanning until the match visually updating by
immediately refreshing from the API on succesful scan. Would be even
faster to optimistically update the local cache of the date, but that's
harder and not really necessary.
Also rate limited the API transfer call to 4x per second as the API did
not handle races well, leading to some cases of multiple customerItems
active at the same time for one item, which caused a "not active" error
in the scanner as number active == 1 is an assert in the API.
@LarsSelbekk LarsSelbekk merged commit 4acf848 into main Jun 12, 2024
8 checks passed
@LarsSelbekk LarsSelbekk deleted the speed-up-scanner branch June 12, 2024 00:33
@AdrianAndersen
Copy link
Member

Guccigucci. I mean it worked pretty flawlessly, so no need to adjust things here ✅

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants