-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Implement ipfs shutdown command #3884
Conversation
@whyrusleeping is there a reason this is a top-level command:
makes a lot more sense to me, for backwards comparability |
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 would make sure that this works in offline
mode.
core/commands/shutdown.go
Outdated
return | ||
} | ||
|
||
if !nd.OnlineMode() { |
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 am not 100% sure but I don't think this works when the daemon is started with the --offline flag.
test_expect_success "daemon no longer running" ' | ||
test_expect_code 1 kill -0 $IPFS_PID | ||
' | ||
|
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 would also test the daemon when started with the --offline
flag.
When I added the test it failed.
Its a top level command because its rather difficult to make a command be a subcommand of the daemon command. I tried that at first and it would have required me to start refactoring things. |
62a4105
to
331bc1b
Compare
@kevina made it work with --offline. Needed to use the |
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 LGTM now.
I would prefer "ipfs daemon stop", but from IRC @whyrusleeping told me that would be difficult due to the special nature of the "daemon" command.
BTW @whyrusleeping codeclimate is failing:
|
Is there any reason to export this command definition.,w:x |
Yeah, probably no reason to export it |
a19c3f9
to
3d48d5a
Compare
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.
test failure: need to add polling with timeout for the check that daemon died
License: MIT Signed-off-by: Jeromy <[email protected]>
1d3781e
to
adb555c
Compare
License: MIT
Signed-off-by: Jeromy [email protected]