Skip to content

Commit

Permalink
fix sigterm termination in job-workers (#960)
Browse files Browse the repository at this point in the history
  • Loading branch information
astrophysik authored Feb 9, 2024
1 parent 8e1bad6 commit dfeaf72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/php-engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1595,11 +1595,11 @@ void generic_event_loop(WorkerType worker_type, bool init_and_listen_rpc_port) n

if (worker_type == WorkerType::general_worker) {
if (sigterm_on && precise_now > sigterm_time && !php_worker_run_flag && pending_http_queue.first_query == (conn_query *)&pending_http_queue) {
vkprintf(1, "Quitting because of sigterm\n");
kprintf("General worker is quitting because of SIGTERM\n");
break;
}
} else if (worker_type == WorkerType::job_worker) {
if (sigterm_on && (precise_now > sigterm_time || !php_worker_run_flag)) {
if (sigterm_on && !php_worker_run_flag) {
kprintf("Job worker is quitting because of SIGTERM\n");
break;
}
Expand Down

0 comments on commit dfeaf72

Please sign in to comment.