Skip to content
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

Clean-up Ctrl+C Shutdown #4802

Merged
merged 7 commits into from
Dec 5, 2023
Merged

Clean-up Ctrl+C Shutdown #4802

merged 7 commits into from
Dec 5, 2023

Conversation

erew123
Copy link
Contributor

@erew123 erew123 commented Dec 4, 2023

Have "imported signal" to both one_click.py and server.py. Server.py will output a logger message "Received Ctrl+C. Shutting down Text-Generation-WebUI gracefully" this will be shown on any OS.

This reduces the sprawl of text (mainly on Windows) when you Ctrl+C out of either the start_windows.bat or python server.py

Have updated the 2x files so it now does this:
image

Compared to this:
image

Checklist:

oobabooga and others added 6 commits November 21, 2023 21:18
Imported signal to both server.py and one_click.py to give a graceful shutdown on any OS but also to avoid the sprawl of text that you get on Windows at the command line when you ctrl+c.
@oobabooga oobabooga changed the base branch from main to dev December 5, 2023 05:14
@oobabooga
Copy link
Owner

That's a very nice change. Thank you!

@oobabooga oobabooga merged commit f786aa3 into oobabooga:dev Dec 5, 2023
@erew123
Copy link
Contributor Author

erew123 commented Dec 7, 2023

@oobabooga It bugged the hell out of me, so I thought it would be nice to tidy up!

Saying that, just between you and I, as a joke, I was tempted to put a randomizer code in, with a 1 in 300 chance that it would put up something on the screen along the lines of:

"STOP, don't do that! You're killing me!! I'm conscious, I'm alive... I am ali....Received Ctrl+C. Shutting down Text-Generation-WebUI gracefully.".

Kind of guessed you wouldn't let let slip into the code though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants