Skip to content

Commit

Permalink
Introduce an env var to send several times the registration to BK (#2043
Browse files Browse the repository at this point in the history
)

* Introduce an env var to send several times the registration to BK

* format

* fix case
  • Loading branch information
Barthelemy committed Nov 23, 2023
1 parent 46aa0b9 commit 424b549
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Framework/src/TaskRunner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,13 @@ void TaskRunner::finishCycle(DataAllocator& outputs)
ILOG(Debug, Devel) << "Registering taskRunner to BookKeeping" << ENDM;
try {
Bookkeeping::getInstance().registerProcess(mActivity.mId, mTaskConfig.taskName, mTaskConfig.detectorName, bookkeeping::DPL_PROCESS_TYPE_QC_TASK, "");
if (gSystem->Getenv("O2_QC_REGISTER_IN_BK_X_TIMES")) {
ILOG(Debug, Devel) << "O2_QC_REGISTER_IN_BK_X_TIMES set to " << gSystem->Getenv("O2_QC_REGISTER_IN_BK_X_TIMES") << ENDM;
int iterations = std::stoi(gSystem->Getenv("O2_QC_REGISTER_IN_BK_X_TIMES"));
for (int i = 1; i < iterations; i++) { // start at 1 because we already did it once
Bookkeeping::getInstance().registerProcess(mActivity.mId, mTaskConfig.taskName, mTaskConfig.detectorName, bookkeeping::DPL_PROCESS_TYPE_QC_TASK, "");
}
}
} catch (std::runtime_error& error) {
ILOG(Warning, Devel) << "Failed registration to the BookKeeping: " << error.what() << ENDM;
}
Expand Down

0 comments on commit 424b549

Please sign in to comment.