Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.


See original GitHub issue

Hi again!!!

Usually, when we want to kill a process, we’ll first try to gracefully kill it. If it refuses to die, we may send another signal to force it to die.

Currently in huey, if we send a SIGINT to consumer, it’ll set the stop flag and try to join the workers. If the workers refuse to die, the consumer has no choice but to wait. If we send another SIGTERM to consumer, it won’t work because the corresponding signal handler only sets some variables. There doesn’t seem to be a way to tell the consumer to not wait anymore and the second SIGTERM signal may be meaningless.

I think it’ll be useful if huey provides the option that users can first try to gracefully kill the consumer, and also ungracefully kill the consumer if it won’t die.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

coleifercommented, Oct 16, 2019

Pushed 2.1.3 with this change.

coleifercommented, Oct 5, 2019

Ah, I guess it is behaving differently with processes than when using threads. I just made a test of using TERM with a blocked worker and indeed – the worker does not shut down immediately. Let me look into it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

send SIGTERM with command line shortcut - Super User
No, SIGTERM cannot be sent from the command line, ... Ctrl + C sends SIGINT which asks to interrupt a program but can...
Read more >
SIGINT And Other Termination Signals in Linux - Baeldung
One common way of using SIGKILL is to first send SIGTERM. We give the process some time to terminate, we may also send...
Read more >
kill - End a process or job, or send it a signal - IBM
kill ends a process by sending it a signal. The default signal is SIGTERM. kill is a built-in shell command. In the tcsh...
Read more >
Linux short simple command how to send SIGTERM to a ...
sudo timeout -vk 5 10 kill PIDhere. Will execute kill , and then attempt to terminate that process if it takes too long....
Read more >
Execute command or function when SIGINT or SIGTERM is ...
trap - SIGINT SIGTERM # clear the trap kill -- -$$ # Sends SIGTERM to child/sub ... You can do that with something...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found