-
Notifications
You must be signed in to change notification settings - Fork 13
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
Stop services when the daemon stops #187
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #187 +/- ##
=========================================
+ Coverage 74.2% 74.58% +0.38%
=========================================
Files 57 57
Lines 1159 1157 -2
=========================================
+ Hits 860 863 +3
+ Misses 229 226 -3
+ Partials 70 68 -2
Continue to review full report at Codecov.
|
…-services-when-daemon-stop # Conflicts: # CHANGELOG.md # cmd/daemon/stop.go # examples/services/test-event # service/hash_test.go # service/start.go
cmd/daemon/stop.go
Outdated
} | ||
for _, hash := range hashes { | ||
// TODO: this function should be execute in a go routine. StopService is blocking | ||
_, err := cli.StopService(context.Background(), &core.StopServiceRequest{ |
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 be called in a async fashion to stop all services at the same time.
I updated |
In this PR I added a new label for docker services
mesg.hash
With this label, we can now from a docker service retrieve the service in the database and do whatever we want. In this case just before stoping the daemon we can stop all the running services
fix #158