From 7b07cb180f59d0fa0ab94ff6c64718887b940365 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 1 Aug 2012 14:28:22 +0200 Subject: [PATCH] Added: #1440 Update the status of the last successful build's output files --HG-- branch : build_pipeline_v3 --- .../service/module_pipeline_slave.cpp | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/code/nel/tools/pipeline/service/module_pipeline_slave.cpp b/code/nel/tools/pipeline/service/module_pipeline_slave.cpp index bbea02c01..307419f7d 100644 --- a/code/nel/tools/pipeline/service/module_pipeline_slave.cpp +++ b/code/nel/tools/pipeline/service/module_pipeline_slave.cpp @@ -287,14 +287,28 @@ public: class CStatusUpdateSlaveTask : public NLMISC::IRunnable { + void cbFile(const std::string &filePath, const CFileStatus &fileStatus, bool success) + { + if (success) + { + m_Slave->addFileStatusToCache(NULL, filePath, fileStatus); // not macro path but works also :) + } + } + + void cbDone() + { + // Not used because we wait for the updateDatabaseStatus function; it's easier. + } + public: CStatusUpdateSlaveTask(CModulePipelineSlave *slave) : m_Slave(slave) { } virtual void run() { - // ****************************************************************************** TODO... - // Read the last build results - // Update the database status of those files - + g_DatabaseStatus->updateDatabaseStatus( + CCallback(this, &CStatusUpdateSlaveTask::cbDone), + TFileStatusCallback(this, &CStatusUpdateSlaveTask::cbFile), + m_Slave->m_ResultPreviousSuccess.MacroPaths, true, false); + // Mark as done { NLMISC::CSynchronized::CAccessor(&m_Slave->m_StatusUpdateSlaveDone).value() = true;