wa0x6e / php-resque-ex-scheduler

An addon for php-resque that lets you queue jobs for execution some time in the future. Follows resque-scheduler.
MIT License
26 stars 24 forks source link

Signal Handling #18

Open tachu opened 6 years ago

tachu commented 6 years ago

Sending QUIT OR TERM signal doesnt seem to actually exit the worker properly. When testing worker will output exiting and hang there until killed by process manager. We are using supervisord and have tested TERM or quit to the PID to exit but supervisord gives up and sends KILL to it.

tachu commented 6 years ago

Actual output from Supervisord

2018-08-14 01:42:25,501 DEBG killing resque_scheduler (pid 175) process group with signal SIGQUIT 2018-08-14 01:42:25,501 DEBG killing resque_scheduler (pid 175) process group with signal SIGQUIT [2018-08-14T01:42:25+00:00] Exiting... 2018-08-14 01:42:25,502 DEBG 'resque_scheduler' stdout output: [2018-08-14T01:42:25+00:00] Exiting...

2018-08-14 01:42:25,502 DEBG 'resque_scheduler' stdout output: [2018-08-14T01:42:25+00:00] Exiting...

2018-08-14 01:42:27,505 INFO waiting for resque_scheduler to die 2018-08-14 01:42:27,505 INFO waiting for resque_scheduler to die 2018-08-14 01:42:30,508 INFO waiting for resque_scheduler to die 2018-08-14 01:42:30,508 INFO waiting for resque_scheduler to die 2018-08-14 01:42:33,512 INFO waiting for resque_scheduler to die 2018-08-14 01:42:33,512 INFO waiting for resque_scheduler to die 2018-08-14 01:42:36,515 INFO waiting for resque_scheduler to die 2018-08-14 01:42:36,515 INFO waiting for resque_scheduler to die 2018-08-14 01:42:39,519 INFO waiting for resque_scheduler to die 2018-08-14 01:42:39,519 INFO waiting for resque_scheduler to die 2018-08-14 01:42:42,523 INFO waiting for resque_scheduler to die 2018-08-14 01:42:42,523 INFO waiting for resque_scheduler to die 2018-08-14 01:42:45,526 INFO waiting for resque_scheduler to die 2018-08-14 01:42:45,526 INFO waiting for resque_scheduler to die 2018-08-14 01:42:48,529 INFO waiting for resque_scheduler to die 2018-08-14 01:42:48,529 INFO waiting for resque_scheduler to die 2018-08-14 01:42:51,533 INFO waiting for resque_scheduler to die 2018-08-14 01:42:51,533 INFO waiting for resque_scheduler to die 2018-08-14 01:42:54,536 INFO waiting for resque_scheduler to die 2018-08-14 01:42:54,536 INFO waiting for resque_scheduler to die 2018-08-14 01:42:55,538 WARN killing 'resque_scheduler' (175) with SIGKILL 2018-08-14 01:42:55,538 WARN killing 'resque_scheduler' (175) with SIGKILL 2018-08-14 01:42:55,538 DEBG killing resque_scheduler (pid 175) process group with signal SIGKILL 2018-08-14 01:42:55,538 DEBG killing resque_scheduler (pid 175) process group with signal SIGKILL