-
Notifications
You must be signed in to change notification settings - Fork 42
Add queued store and display active users #1045
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
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1045 +/- ##
==========================================
+ Coverage 75.32% 75.36% +0.03%
==========================================
Files 590 592 +2
Lines 43138 43197 +59
Branches 746 746
==========================================
+ Hits 32493 32554 +61
+ Misses 10566 10564 -2
Partials 79 79
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
module OpenC3 | ||
class StoreQueued | ||
# How often in seconds the store is updated | ||
UPDATE_INTERVAL = 2 |
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.
why 2?
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.
This needs to be an argument to the instance on first use (like System). I want to use this same class to implement #987
# Mutex used to ensure that only one instance is created | ||
@@instance_mutex = Mutex.new | ||
|
||
# Thread used to post metrics across all classes |
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.
metrics?
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.
typo
end | ||
end | ||
|
||
def self.shutdown |
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.
who calls this?
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.
no one ... it's left over from the metrics thread I borrowed
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.
Should be added to at_exit when instance created
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.
Should be instance method
@store_queue = Queue.new | ||
|
||
at_exit() do | ||
self.shutdown() |
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.
Make shutdown an instance method
@@instance_mutex = Mutex.new | ||
|
||
# Thread used to call methods on the store | ||
@@update_thread = nil |
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.
This should just be an instance variable
@@update_thread = nil | ||
|
||
# Sleeper used to delay update thread | ||
@@update_sleeper = nil |
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.
This should just be an instance variable
end | ||
end | ||
|
||
def self.shutdown |
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.
Should be instance method
Let me make some changes to this one before you merge it. |
|
No description provided.