Skip to content

Commit 424b549

Browse files
authored
Introduce an env var to send several times the registration to BK (#2043)
* Introduce an env var to send several times the registration to BK * format * fix case
1 parent 46aa0b9 commit 424b549

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Framework/src/TaskRunner.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,13 @@ void TaskRunner::finishCycle(DataAllocator& outputs)
478478
ILOG(Debug, Devel) << "Registering taskRunner to BookKeeping" << ENDM;
479479
try {
480480
Bookkeeping::getInstance().registerProcess(mActivity.mId, mTaskConfig.taskName, mTaskConfig.detectorName, bookkeeping::DPL_PROCESS_TYPE_QC_TASK, "");
481+
if (gSystem->Getenv("O2_QC_REGISTER_IN_BK_X_TIMES")) {
482+
ILOG(Debug, Devel) << "O2_QC_REGISTER_IN_BK_X_TIMES set to " << gSystem->Getenv("O2_QC_REGISTER_IN_BK_X_TIMES") << ENDM;
483+
int iterations = std::stoi(gSystem->Getenv("O2_QC_REGISTER_IN_BK_X_TIMES"));
484+
for (int i = 1; i < iterations; i++) { // start at 1 because we already did it once
485+
Bookkeeping::getInstance().registerProcess(mActivity.mId, mTaskConfig.taskName, mTaskConfig.detectorName, bookkeeping::DPL_PROCESS_TYPE_QC_TASK, "");
486+
}
487+
}
481488
} catch (std::runtime_error& error) {
482489
ILOG(Warning, Devel) << "Failed registration to the BookKeeping: " << error.what() << ENDM;
483490
}

0 commit comments

Comments
 (0)