From ccd232eec8ee8c3e24dfa2ff4f48a62326ecd2f5 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 4 Mar 2012 13:39:28 +0100 Subject: [PATCH] Added: #1440 Some more debug info --HG-- branch : build_pipeline_v3 --- .../tools/pipeline/service/module_pipeline_master.cpp | 10 +++++++--- .../tools/pipeline/service/module_pipeline_slave.cpp | 9 ++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/code/nel/tools/pipeline/service/module_pipeline_master.cpp b/code/nel/tools/pipeline/service/module_pipeline_master.cpp index c5583d56e..123155549 100644 --- a/code/nel/tools/pipeline/service/module_pipeline_master.cpp +++ b/code/nel/tools/pipeline/service/module_pipeline_master.cpp @@ -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 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(slave, &CSlave::cbUpdateDatabaseStatus), slave->Vector, false, false); slave->Vector.clear(); } diff --git a/code/nel/tools/pipeline/service/module_pipeline_slave.cpp b/code/nel/tools/pipeline/service/module_pipeline_slave.cpp index 11543c544..abd37814e 100644 --- a/code/nel/tools/pipeline/service/module_pipeline_slave.cpp +++ b/code/nel/tools/pipeline/service/module_pipeline_slave.cpp @@ -206,15 +206,16 @@ public: processInfo->setPipelineProcess(pipelineProcess); processInfo->getDependentDirectories(result); for (std::vector::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::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]);