forked from lsmyrnaios/UrlsController
Do not send shutDownRequests to workers which have already shutdown.
This commit is contained in:
parent
a38d6ace79
commit
f9c6bad768
|
@ -41,8 +41,10 @@ public class ShutdownController {
|
|||
else {
|
||||
shouldShutdownService = true;
|
||||
// Send "shutdownWorker" requests to all Workers.
|
||||
for ( String workerId : UrlsController.workersInfoMap.keySet() )
|
||||
shutdownService.postShutdownOrCancelRequestToWorker(workerId, UrlsController.workersInfoMap.get(workerId).getWorkerIP(), false);
|
||||
for ( String workerId : UrlsController.workersInfoMap.keySet() ) {
|
||||
if ( ! UrlsController.workersInfoMap.get(workerId).getHasShutdown() )
|
||||
shutdownService.postShutdownOrCancelRequestToWorker(workerId, UrlsController.workersInfoMap.get(workerId).getWorkerIP(), false);
|
||||
}
|
||||
|
||||
// That's it for now. The workers may take some hours to finish their work (including delivering the full-text files).
|
||||
// A scheduler monitors the shutdown of the workers. Once all worker have shutdown, the Controller shuts down as well.
|
||||
|
|
Loading…
Reference in New Issue