-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[FIX] Send usage statistics in a thread at startup #3632
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3632 +/- ##
==========================================
+ Coverage 84.43% 84.43% +<.01%
==========================================
Files 372 372
Lines 68111 68111
==========================================
+ Hits 57511 57512 +1
+ Misses 10600 10599 -1 |
@@ -271,6 +272,16 @@ def compare_versions(latest): | |||
thread.start() | |||
return thread | |||
|
|||
def send_usage_statistics(): | |||
|
|||
class SendUsageStatistics(QThread): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if there is an uncaught exception in a QThread for any reason? I faintly remember some problems with crashing and uncaught exceptions in threads, but that might be just my imagination.
Also, as this addition is a non-vital part of Orange, I recommend being defensive. See send_usage_statistics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean like this? I added an except Exception to send_statistics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a commit that moves checking for exception to run(). Because, for example, an exception could also happen in json loading (if file was saved incorrectly). Could you verify if everything is still OK?
87450fa
to
9cfa417
Compare
a89cd96
to
8bb3b2b
Compare
8bb3b2b
to
75a8c05
Compare
Issue
Fixes #3597
Description of changes
When closing Orange, usage statistics are saved. Then, when starting Orange, usage statistics are sent in the background.
Includes