Ver código fonte

Added file release to Job::finalize()

Improved shutdown reporting


git-svn-id: https://svn.microneil.com/svn/SNF4CGP/trunk@27 59e8e3e7-56fa-483b-b4b4-fa6ab0af3dfc
master
madscientist 15 anos atrás
pai
commit
3f7198f89a
2 arquivos alterados com 8 adições e 2 exclusões
  1. 4
    0
      SNF4CGP/ExecutiveProcess.cpp
  2. 4
    2
      SNF4CGP/JobPool.cpp

+ 4
- 0
SNF4CGP/ExecutiveProcess.cpp Ver arquivo

@@ -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();
}

+ 4
- 2
SNF4CGP/JobPool.cpp Ver arquivo

@@ -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() {

Carregando…
Cancelar
Salvar