-
-
Notifications
You must be signed in to change notification settings - Fork 402
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 restart functionality #1333
Conversation
Best I can tell, After looking into this, though, I think a |
Still WIP on the CLI front, but I did notice that |
I'm done implementing. No unit tests, because I'm not really sure how to test restarting within the testing framework (it uses a mock Sopel, not a real process). Moving back to Needs Review. |
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.
Approved. It's also nice that you explained why SIGTERM
and SIGILL
are used instead of just SIGUSR*
.
Rebased on |
I'm so sorry for the merge conflict all over the place. :D |
Adapted from 3b7dcad in PR 1103. I just removed some stuff that broke. — dgw
"TypeError: 'bool' object is not callable" is all .restart would do, because `restart` was defined as a class method and then overridden as a boolean flag when the class was instantiated. Kept the restart() method name, renamed the flag, Bob's your uncle.
A few commits back, the commit adding the "restart" command originally tried to do some cleanup, too. It was left out of the final version of PR #1333 due to breaking the use of ^C to quit Sopel interactively. These TODO comments will serve as a reminder to eventually figure out why the hell shit broke from something that should be simple, like replacing os._exit() calls (not a great habit) with return values. Something that shouldn't cause any change in function, but somehow did.
A few commits back, the commit adding the "restart" command originally tried to do some cleanup, too. It was left out of the final version of PR sopel-irc#1333 due to breaking the use of ^C to quit Sopel interactively. These TODO comments will serve as a reminder to eventually figure out why the hell shit broke from something that should be simple, like replacing os._exit() calls (not a great habit) with return values. Something that shouldn't cause any change in function, but somehow did.
This PR is an up-to-date version of the seemingly abandoned #1103 by @pachuco.
Personally, I need to dig more into why the
pid_file
parameter exists inrun()
, and why it was removed in this PR. But any further changes I might make to this pull request as a result will be in new commits, so as not to overwrite @pachuco's author credits in the commit log.Assigning to 7.0.0 for now, to match the tentative (but never official) placement of the original PR. (Target milestone subject to change, of course.)