瀏覽代碼

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 年之前
父節點
當前提交
3f7198f89a
共有 2 個文件被更改,包括 8 次插入2 次删除
  1. 4
    0
      SNF4CGP/ExecutiveProcess.cpp
  2. 4
    2
      SNF4CGP/JobPool.cpp

+ 4
- 0
SNF4CGP/ExecutiveProcess.cpp 查看文件

@@ -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 查看文件

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

Loading…
取消
儲存