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

BTE attempts to read specs while they're being written #703

Closed
tokebe opened this issue Aug 17, 2023 · 1 comment
Closed

BTE attempts to read specs while they're being written #703

tokebe opened this issue Aug 17, 2023 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@tokebe
Copy link
Member

tokebe commented Aug 17, 2023

Rarely, it appears that BTE receives a query causing it to read the smartapi specs at the same time the cron job to update them is writing to the file, causing a SyntaxError with the message "unexpected end of JSON input".

This can be solved by caching the specs in redis and reading from that instead, while the cron job first writes the file, and then writes to redis. Redis handles ensuring read/write won't happen simultaneously.

@tokebe tokebe added bug Something isn't working good first issue Good for newcomers labels Aug 17, 2023
@tokebe
Copy link
Member Author

tokebe commented Aug 17, 2023

Note that this issue is rare enough, and its fix involved enough, that we're not targeting it for the (very much impending) Milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant