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

The watchfiles SDK unexpectedly replaces the SIGTERM handler #1146

Open
mykola-mokhnach-parloa opened this issue Nov 28, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@mykola-mokhnach-parloa
Copy link

While killing the process started by cli.run_app method using SIGTERM I can observe the following log line:

2024-11-28 11:09:30,796 - �[33mWARNING�[0m watchfiles.main - received signal 15, raising KeyboardInterrupt 

I assume this is not expected as the invocation of https://github.com/samuelcolvin/watchfiles/blob/cb0bcd84ae4ebea084c1db1adcf7a778952b3842/watchfiles/run.py#L438C19-L438C33 overrides the signal handler set in

for sig in (signal.SIGINT, signal.SIGTERM):

@mykola-mokhnach-parloa mykola-mokhnach-parloa added the bug Something isn't working label Nov 28, 2024
@theomonnom
Copy link
Member

TIL that watchfiles replaces this handler, but in a production environment, the dev subcommand isn't recommended. The start command, on the other hand, doesn’t rely on watchfiles at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants