resty-cli icon indicating copy to clipboard operation
resty-cli copied to clipboard

Terminate (gracefully) long running process

Open LGMAM opened this issue 4 years ago • 0 comments

We are using resty to run some long running processes - basically a while true loop that consumes messages from a message queue and then make some http calls for each message.

When sending a QUIT signal to resty, it correctly propagates the signal to the underlying nginx process.

Is there any way for my process to know that we have received that signal, so that we can exit for while loop, expire the resty timer and complete graceful shutdown ?

Thanks.

LGMAM avatar Sep 03 '21 10:09 LGMAM