[FIX] Send usage statistics in a thread at startup#3632
[FIX] Send usage statistics in a thread at startup#3632markotoplak merged 2 commits intobiolab:masterfrom
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 |
|
|
||
| def send_usage_statistics(): | ||
|
|
||
| class SendUsageStatistics(QThread): |
There was a problem hiding this comment.
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.
Did you mean like this? I added an except Exception to send_statistics.
There was a problem hiding this comment.
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