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

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

Merged
merged 1 commit into from
Jun 12, 2024
Merged

Conversation

LarsSelbekk
Copy link
Member

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.
@AdrianAndersen
Copy link
Member

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

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

Successfully merging this pull request may close these issues.

2 participants