Added: #1440 Some more debug info

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 13 years ago
parent 0cd3a76a3e
commit ccd232eec8

@ -47,7 +47,8 @@ using namespace NLNET;
namespace PIPELINE {
#define PIPELINE_INFO_MASTER_RELOAD_SHEETS "MASTER_RELOAD_SHEETS"
#define PIPELINE_INFO_MASTER_RELOAD_SHEETS "M_RELOAD_SHEETS"
#define PIPELINE_INFO_MASTER_UPDATE_DATABASE_FOR_SLAVE "M_UPD_DB_FOR_S"
/**
* \brief CModulePipelineMaster
@ -72,7 +73,7 @@ class CModulePipelineMaster :
std::vector<std::string> Vector;
uint32 ActiveTaskId;
bool SheetsOk;
~CSlave()
{
if (!SheetsOk)
@ -80,10 +81,12 @@ class CModulePipelineMaster :
CInfoFlags::getInstance()->removeFlag(PIPELINE_INFO_MASTER_RELOAD_SHEETS);
}
}
// TODO: THIS WILL CRASH IF CALLED WHEN THE SLAVE ALREADY DISCONNECTED!!! USE A SELF DELETING CLASS INSTEAD (and check g_IsExiting there too)!!!
void cbUpdateDatabaseStatus()
{
Proxy.masterUpdatedDatabaseStatus(Master);
CInfoFlags::getInstance()->removeFlag(PIPELINE_INFO_MASTER_UPDATE_DATABASE_FOR_SLAVE);
}
bool canAcceptTask()
@ -196,6 +199,7 @@ public:
virtual void updateDatabaseStatusByVector(NLNET::IModuleProxy *sender)
{
CSlave *slave = m_Slaves[sender];
CInfoFlags::getInstance()->addFlag(PIPELINE_INFO_MASTER_UPDATE_DATABASE_FOR_SLAVE);
g_DatabaseStatus->updateDatabaseStatus(CCallback<void>(slave, &CSlave::cbUpdateDatabaseStatus), slave->Vector, false, false);
slave->Vector.clear();
}

@ -206,15 +206,16 @@ public:
processInfo->setPipelineProcess(pipelineProcess);
processInfo->getDependentDirectories(result);
for (std::vector<std::string>::iterator it = result.begin(), end = result.end(); it != end; ++it)
Slave->m_Master->vectorPushString(Slave, *it);
Slave->m_Master->vectorPushString(Slave, PIPELINE::macroPath(*it));
result.clear();
processInfo->getDependentFiles(result);
for (std::vector<std::string>::iterator it = result.begin(), end = result.end(); it != end; ++it)
Slave->m_Master->vectorPushString(Slave, *it);
Slave->m_Master->vectorPushString(Slave, PIPELINE::macroPath(*it));
result.clear();
}
break;
default:
nlwarning("Not implemented.");
nlwarning("Not implemented");
break;
}
}
@ -234,6 +235,8 @@ public:
NLMISC_CLASS_COMMAND_IMPL(CModulePipelineSlave, testUpdateDatabaseStatus)
{
// EXAMPLE USAGE: slave.testUpdateDatabaseStatus common_interface Interface
if (args.size() != 2) return false;
PIPELINE::CPipelineProject *project = PIPELINE::g_PipelineWorkspace->getProject(args[0]);

Loading…
Cancel
Save