-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add service ready signal #218
Conversation
Codecov Report
@@ Coverage Diff @@
## main #218 +/- ##
==========================================
+ Coverage 93.70% 93.73% +0.02%
==========================================
Files 42 44 +2
Lines 3179 3496 +317
==========================================
+ Hits 2979 3277 +298
- Misses 200 219 +19
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Just requested some small changes, otherwise this look super 👍
aquadoggo/src/http/service.rs
Outdated
context: Context, | ||
signal: Shutdown, | ||
tx: ServiceSender, | ||
tx_ready: oneshot::Sender<()>, |
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.
Maybe give the sender also an own type like you already do for the receiver (ServiceReady
)? I think that would also ready easier as well.
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.
Like this?
Services receive an additional parameter with a oneshot channel to which they send a unit value once they are ready to process messages on the communication bus. This allows us to understand when a service becomes ready from outside the service. Previously there were a couple of tests that waited for some arbitrary time to allow services to become available.
📋 Checklist
CHANGELOG.md