Server application performing load balancing and monitoring of nodejs applications
Revision | 6e8c8080d061d9abf353aba0e4cb75dc32be8338 (tree) |
---|---|
Zeit | 2021-05-27 01:59:51 |
Autor | v.o.markin |
Commiter | v.o.markin |
Emergency reboot of NODEJS processes upon request
@@ -399,7 +399,6 @@ | ||
399 | 399 | _processes[current_procindex].active = false; |
400 | 400 | _processes[reserve_procindex].active = true; |
401 | 401 | |
402 | - // TODO: Добавить срочную перезагрузку процесса по флагу restart_flag | |
403 | 402 | std::this_thread::sleep_for(std::chrono::milliseconds(100)); |
404 | 403 | std::chrono::system_clock::time_point starttm = std::chrono::system_clock::now(); |
405 | 404 | while(true) { |
@@ -419,7 +418,7 @@ | ||
419 | 418 | } |
420 | 419 | |
421 | 420 | std::swap(current_procindex, reserve_procindex); |
422 | - _stop_process(reserve_procindex, false); | |
421 | + _stop_process(reserve_procindex, false, !!restart_flag); | |
423 | 422 | |
424 | 423 | lock.lock(); |
425 | 424 | } |