Changed: #1440 Clear update flags

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 12 years ago
parent 289cfecf73
commit 6f55028ffa

@ -402,7 +402,7 @@ public:
// TODO
}
/// When the user aborts slave-side, when slave-side exits, etc
/// When the user aborts slave-side, when slave-side exits, etc (assume the master requested abort or the slave crashed)
virtual void slaveAbortedBuildTask(NLNET::IModuleProxy *sender)
{
// TODO
@ -414,8 +414,8 @@ public:
m_BuildTaskQueue.abortedTask(slave->ActiveTaskId);
slave->ActiveTaskId = 0;
// --slave->SaneBehaviour; // legal behaviour
// slave->TimeOutStamp = NLMISC::CTime::getSecondsSince1970() + 30; // timeout for 30 seconds on this slave
CInfoFlags::getInstance()->addFlag(PIPELINE_INFO_SLAVE_ABORTED);
// slave->TimeOutStamp = NLMISC::CTime::getSecondsSince1970() + 30; // timeout for 30 seconds on this slave // no timeout
// CInfoFlags::getInstance()->addFlag(PIPELINE_INFO_SLAVE_ABORTED); // don't keep a count
// TODO
}

@ -204,20 +204,26 @@ public:
break;
case STATUS_UPDATE:
{
if (NLMISC::CSynchronized<bool>::CAccessor(&m_StatusUpdateMasterDone).value()
&& NLMISC::CSynchronized<bool>::CAccessor(&m_StatusUpdateSlaveDone).value())
NLMISC::CSynchronized<bool>::CAccessor statusUpdateMasterDone(&m_StatusUpdateMasterDone);
if (statusUpdateMasterDone.value())
{
if (m_AbortRequested)
NLMISC::CSynchronized<bool>::CAccessor statusUpdateSlaveDone(&m_StatusUpdateSlaveDone);
if (statusUpdateSlaveDone.value())
{
nlinfo("Aborted slave task after status update");
finalizeAbort();
}
else
{
nlinfo("Slave task: Status update done");
m_SlaveTaskState = SOMEWHERE_INBETWEEN;
// Done with the status updating, now do something fancey
// ... TODO ...
statusUpdateMasterDone.value() = false;
statusUpdateSlaveDone.value() = false;
if (m_AbortRequested)
{
nlinfo("Aborted slave task after status update");
finalizeAbort();
}
else
{
nlinfo("Slave task: Status update done");
m_SlaveTaskState = SOMEWHERE_INBETWEEN;
// Done with the status updating, now do something fancey
// ... TODO ...
}
}
}
}

Loading…
Cancel
Save