Skip to content

Commit 6538ed7

Browse files
authored
[QC-1001] Register at the end of the first cycle instead of SOR (#2034)
* [QC-1001] Register at the end of the first cycle instead of SOR * add back the modules
1 parent 7c43de6 commit 6538ed7

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

Framework/src/TaskRunner.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -434,16 +434,6 @@ void TaskRunner::startOfActivity()
434434
mCollector->setRunNumber(mActivity.mId);
435435
mTask->startOfActivity(mActivity);
436436
mObjectsManager->updateServiceDiscovery();
437-
438-
// register ourselves to the BK
439-
if (gSystem->Getenv("O2_QC_REGISTER_IN_BK")) { // until we are sure it works, we have to turn it on
440-
ILOG(Debug, Devel) << "Registering taskRunner to BookKeeping" << ENDM;
441-
try {
442-
Bookkeeping::getInstance().registerProcess(mActivity.mId, mTaskConfig.taskName, mTaskConfig.detectorName, bookkeeping::DPL_PROCESS_TYPE_QC_TASK, "");
443-
} catch (std::runtime_error& error) {
444-
ILOG(Warning, Devel) << "Failed registration to the BookKeeping: " << error.what() << ENDM;
445-
}
446-
}
447437
}
448438

449439
void TaskRunner::endOfActivity()
@@ -483,6 +473,16 @@ void TaskRunner::finishCycle(DataAllocator& outputs)
483473
<< "(" << mTimekeeper->getTimerangeIdRange().getMin() << ", " << mTimekeeper->getTimerangeIdRange().getMax() << ")" << ENDM;
484474
mTask->endOfCycle();
485475

476+
// register ourselves to the BK at the first cycle
477+
if (mCycleNumber == 0 && gSystem->Getenv("O2_QC_REGISTER_IN_BK")) { // until we are sure it works, we have to turn it on
478+
ILOG(Debug, Devel) << "Registering taskRunner to BookKeeping" << ENDM;
479+
try {
480+
Bookkeeping::getInstance().registerProcess(mActivity.mId, mTaskConfig.taskName, mTaskConfig.detectorName, bookkeeping::DPL_PROCESS_TYPE_QC_TASK, "");
481+
} catch (std::runtime_error& error) {
482+
ILOG(Warning, Devel) << "Failed registration to the BookKeeping: " << error.what() << ENDM;
483+
}
484+
}
485+
486486
// this stays until we move to using mTimekeeper.
487487
auto nowMs = getCurrentTimestamp();
488488
mObjectsManager->setValidity(mTimekeeper->getValidity());

0 commit comments

Comments
 (0)