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

move version checker to a thread #421

Merged
merged 7 commits into from Sep 21, 2020
Merged

move version checker to a thread #421

merged 7 commits into from Sep 21, 2020

Conversation

stepansnigirev
Copy link
Collaborator

@stepansnigirev stepansnigirev commented Sep 20, 2020

We are triggering version check on index and all settings pages.
For me, it is slowing down page loading time by a factor of 2.
If the internet is slow or unavailable it is taking several seconds.

This PR moves version checker to a separate thread which checks for new versions once per hour.
As it is a thread it doesn't slow down page loading, but upgrade messages still can be shown to the user.

I also changed the upgrade message because pip upgrade instructions are confusing for people using mynode / rapiblitz and other nodes-in-the-box.

@ben-kaufman
Copy link
Contributor

Works great. If I understand correctly though it will still not show the exact version for binary app installs, maybe it belongs to another PR but would be nice to fix that. Also I see it won't show an upgrade message to binary app users, maybe we can check somehow also for that from pip and see if the latest there has a higher version?

@stepansnigirev
Copy link
Collaborator Author

stepansnigirev commented Sep 21, 2020

For notifications in binaries we need to put the version number somewhere in the code during the build process. I think it's possible with pyinstaller spec files.
We could fetch the latest release from github api:
https://api.github.com/repos/cryptoadvance/specter-desktop/releases

I will look into that and make changes in this PR.

@stepansnigirev
Copy link
Collaborator Author

Done. Now binaries should show version as well and do version checks.

@stepansnigirev stepansnigirev merged commit bd89c8c into cryptoadvance:master Sep 21, 2020
@stepansnigirev stepansnigirev deleted the version-observer branch September 21, 2020 16:12
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.

None yet

2 participants