cosmetics

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1849 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hsc
2012-10-26 16:13:36 +00:00
parent 5a5367beee
commit 55dd79cc03

View File

@ -198,19 +198,19 @@ void CommThread::operator()()
} }
switch (ctrlmsg.command()) { switch (ctrlmsg.command()) {
case FailControlMessage_Command_NEED_WORK: case FailControlMessage::NEED_WORK:
// let old clients die (run_id == 0 -> possibly virgin client) // let old clients die (run_id == 0 -> possibly virgin client)
if (!ctrlmsg.has_run_id() || (ctrlmsg.run_id() != 0 && ctrlmsg.run_id() != m_js.m_runid)) { if (!ctrlmsg.has_run_id() || (ctrlmsg.run_id() != 0 && ctrlmsg.run_id() != m_js.m_runid)) {
cout << "!![Server] telling old client to die" << endl; cout << "!![Server] telling old client to die" << endl;
ctrlmsg.Clear(); ctrlmsg.Clear();
ctrlmsg.set_command(FailControlMessage_Command_DIE); ctrlmsg.set_command(FailControlMessage::DIE);
ctrlmsg.set_build_id(42); ctrlmsg.set_build_id(42);
SocketComm::sendMsg(minion.getSocketDescriptor(), ctrlmsg); SocketComm::sendMsg(minion.getSocketDescriptor(), ctrlmsg);
} }
// give minion something to do.. // give minion something to do..
sendPendingExperimentData(minion); sendPendingExperimentData(minion);
break; break;
case FailControlMessage_Command_RESULT_FOLLOWS: case FailControlMessage::RESULT_FOLLOWS:
// ignore old client's results // ignore old client's results
if (!ctrlmsg.has_run_id() || ctrlmsg.run_id() != m_js.m_runid) { if (!ctrlmsg.has_run_id() || ctrlmsg.run_id() != m_js.m_runid) {
cout << "!![Server] ignoring old client's results" << endl; cout << "!![Server] ignoring old client's results" << endl;
@ -224,7 +224,7 @@ void CommThread::operator()()
cout << "!![Server] no idea what to do with command #" cout << "!![Server] no idea what to do with command #"
<< ctrlmsg.command() << ", telling minion to die." << endl; << ctrlmsg.command() << ", telling minion to die." << endl;
ctrlmsg.Clear(); ctrlmsg.Clear();
ctrlmsg.set_command(FailControlMessage_Command_DIE); ctrlmsg.set_command(FailControlMessage::DIE);
ctrlmsg.set_build_id(42); ctrlmsg.set_build_id(42);
SocketComm::sendMsg(minion.getSocketDescriptor(), ctrlmsg); SocketComm::sendMsg(minion.getSocketDescriptor(), ctrlmsg);
} }
@ -249,7 +249,7 @@ void CommThread::sendPendingExperimentData(Minion& minion)
if (!m_js.m_runningJobs.insert(workloadID, exp)) { if (!m_js.m_runningJobs.insert(workloadID, exp)) {
cout << "!![Server]could not insert workload id: [" << workloadID << "] double entry?" << endl; cout << "!![Server]could not insert workload id: [" << workloadID << "] double entry?" << endl;
} }
ctrlmsg.set_command(FailControlMessage_Command_WORK_FOLLOWS); ctrlmsg.set_command(FailControlMessage::WORK_FOLLOWS);
ctrlmsg.set_workloadid(workloadID); // set workload id ctrlmsg.set_workloadid(workloadID); // set workload id
//cout << ">>[Server] Sending workload [" << workloadID << "]" << endl; //cout << ">>[Server] Sending workload [" << workloadID << "]" << endl;
cout << ">>[" << workloadID << "] " << flush; cout << ">>[" << workloadID << "] " << flush;
@ -275,7 +275,7 @@ void CommThread::sendPendingExperimentData(Minion& minion)
// single parameter-set, @see receiveExperimentResults.) // single parameter-set, @see receiveExperimentResults.)
uint32_t workloadID = exp->getWorkloadID(); // (this ID has been set previously) uint32_t workloadID = exp->getWorkloadID(); // (this ID has been set previously)
// Resend the parameter-set. // Resend the parameter-set.
ctrlmsg.set_command(FailControlMessage_Command_WORK_FOLLOWS); ctrlmsg.set_command(FailControlMessage::WORK_FOLLOWS);
ctrlmsg.set_workloadid(workloadID); // set workload id ctrlmsg.set_workloadid(workloadID); // set workload id
//cout << ">>[Server] Re-sending workload [" << workloadID << "]" << endl; //cout << ">>[Server] Re-sending workload [" << workloadID << "]" << endl;
cout << ">>R[" << workloadID << "] " << flush; cout << ">>R[" << workloadID << "] " << flush;
@ -284,12 +284,12 @@ void CommThread::sendPendingExperimentData(Minion& minion)
} else if (m_js.noMoreExperiments() == false) { } else if (m_js.noMoreExperiments() == false) {
// Currently we have no workload (even the running-job-queue is empty!), but // Currently we have no workload (even the running-job-queue is empty!), but
// the campaign is not over yet. Minion can try again later. // the campaign is not over yet. Minion can try again later.
ctrlmsg.set_command(FailControlMessage_Command_COME_AGAIN); ctrlmsg.set_command(FailControlMessage::COME_AGAIN);
SocketComm::sendMsg(minion.getSocketDescriptor(), ctrlmsg); SocketComm::sendMsg(minion.getSocketDescriptor(), ctrlmsg);
cout << "--[Server] No workload, come again..." << endl; cout << "--[Server] No workload, come again..." << endl;
} else { } else {
// No more elements, and campaign is over. Minion can die. // No more elements, and campaign is over. Minion can die.
ctrlmsg.set_command(FailControlMessage_Command_DIE); ctrlmsg.set_command(FailControlMessage::DIE);
cout << "--[Server] No workload, and no campaign, please die." << endl; cout << "--[Server] No workload, and no campaign, please die." << endl;
SocketComm::sendMsg(minion.getSocketDescriptor(), ctrlmsg); SocketComm::sendMsg(minion.getSocketDescriptor(), ctrlmsg);
} }