|
25 | 25 | #include "QualityControl/runnerUtils.h" |
26 | 26 | #include "QualityControl/ConfigParamGlo.h" |
27 | 27 | #include "QualityControl/MonitorObjectCollection.h" |
| 28 | +#include "QualityControl/Bookkeeping.h" |
28 | 29 |
|
29 | 30 | #include <utility> |
30 | 31 | #include <Framework/DataAllocator.h> |
31 | 32 | #include <Framework/DataTakingContext.h> |
32 | 33 | #include <CommonUtils/ConfigurableParam.h> |
| 34 | +#include <TSystem.h> |
33 | 35 |
|
34 | 36 | using namespace o2::quality_control::core; |
35 | 37 | using namespace o2::quality_control::repository; |
@@ -89,6 +91,7 @@ void PostProcessingRunner::init(const PostProcessingRunnerConfig& runnerConfig, |
89 | 91 | if (mPublicationCallback == nullptr) { |
90 | 92 | mPublicationCallback = publishToRepository(*mDatabase); |
91 | 93 | } |
| 94 | + Bookkeeping::getInstance().init(runnerConfig.bookkeepingUrl); |
92 | 95 |
|
93 | 96 | // setup user's task |
94 | 97 | ILOG(Debug, Devel) << "Creating a user task '" << mTaskConfig.taskName << "'" << ENDM; |
@@ -167,6 +170,11 @@ void PostProcessingRunner::start(framework::ServiceRegistryRef dplServices) |
167 | 170 | } |
168 | 171 | QcInfoLogger::setRun(mTaskConfig.activity.mId); |
169 | 172 |
|
| 173 | + // register ourselves to the BK |
| 174 | + if (gSystem->Getenv("O2_QC_REGISTER_IN_BK")) { // until we are sure it works, we have to turn it on |
| 175 | + Bookkeeping::getInstance().registerProcess(mTaskConfig.activity.mId, mRunnerConfig.taskName, mRunnerConfig.detectorName, bookkeeping::DPL_PROCESS_TYPE_QC_POSTPROCESSING, ""); |
| 176 | + } |
| 177 | + |
170 | 178 | if (mTaskState == TaskState::Created || mTaskState == TaskState::Finished) { |
171 | 179 | mInitTriggers = trigger_helpers::createTriggers(mTaskConfig.initTriggers, mTaskConfig); |
172 | 180 | if (trigger_helpers::hasUserOrControlTrigger(mTaskConfig.initTriggers)) { |
@@ -256,6 +264,7 @@ PostProcessingRunnerConfig PostProcessingRunner::extractConfig(const CommonSpec& |
256 | 264 | ppTaskSpec.detectorName, |
257 | 265 | commonSpec.database, |
258 | 266 | commonSpec.consulUrl, |
| 267 | + commonSpec.bookkeepingUrl, |
259 | 268 | commonSpec.infologgerDiscardParameters, |
260 | 269 | commonSpec.postprocessingPeriod, |
261 | 270 | "", |
|
0 commit comments