Improved shutdown reporting git-svn-id: https://svn.microneil.com/svn/SNF4CGP/trunk@27 59e8e3e7-56fa-483b-b4b4-fa6ab0af3dfcmaster
@@ -69,6 +69,8 @@ void ExecutiveProcess::doProcessing() { | |||
if(Command::QUIT != C.Type) dispatchCommand(C); | |||
else { | |||
QuitJobNumber = C.Number; | |||
cout << "* SNF4CGP[" << C.Number << "] Received QUIT, shutting down..." << endl; | |||
cout.flush(); | |||
return; | |||
} | |||
} | |||
@@ -78,5 +80,7 @@ void ExecutiveProcess::doShutdown() { | |||
shutdownWorkerPool(); | |||
shutdownOutput(); | |||
shutdownJobPool(); | |||
cout << "* SNF4CGP Shutdown completed." << endl; | |||
cout << QuitJobNumber << " OK" << endl; | |||
cout.flush(); | |||
} |
@@ -95,8 +95,10 @@ void Job::emitREJECTED(const string& Report) { | |||
O << CurrentCommand.Number << " REJECTED " << formatAsCGPString(Report) << endl; | |||
} | |||
void Job::finalize() { | |||
Output.outputJob(*this); | |||
void Job::finalize() { // Cleanup and report this job. | |||
closeWriter(); // In case of exception let go of our | |||
closeReader(); // Reader and Writer now. The rest | |||
Output.outputJob(*this); // can wait for the output processor. | |||
} | |||
void Job::doWakeUp() { |