Skip to content

Commit 914bfa1

Browse files
committed
going back to original implementation with DataProcessorSpec and using its metadata to store executable
1 parent 841b74a commit 914bfa1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Framework/Core/src/runDataProcessing.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2933,8 +2933,9 @@ int doMain(int argc, char** argv, o2::framework::WorkflowSpec const& workflow,
29332933
workflowHashA += hash_fn(dp.name);
29342934
}
29352935

2936-
for (auto& dp : workflow) {
2936+
for (auto& dp : physicalWorkflow) {
29372937
rankIndex.insert(std::make_pair(dp.name, workflowHashA));
2938+
dp.metadata.emplace(dp.metadata.begin(), std::string{"executable"}, currentWorkflow.executable);
29382939
}
29392940

29402941
std::vector<DataProcessorInfo> dataProcessorInfos;
@@ -2956,11 +2957,10 @@ int doMain(int argc, char** argv, o2::framework::WorkflowSpec const& workflow,
29562957
// We remove the duplicates because for the moment child get themself twice:
29572958
// once from the actual definition in the child, a second time from the
29582959
// configuration they get passed by their parents.
2959-
std::regex pipe_pattern{"_t[0-9][0-9]*$"};
29602960
for (auto& dp : importedWorkflow) {
2961-
auto found = std::find_if(dataProcessorInfos.begin(), dataProcessorInfos.end(),
2962-
[&name = dp.name, &pipe_pattern, &exec = currentWorkflow.executable](DataProcessorInfo const& info) { return (std::regex_replace(info.name, pipe_pattern, "") == name && info.executable == exec); });
2963-
if (found == dataProcessorInfos.end()) {
2961+
auto found = std::find_if(physicalWorkflow.begin(), physicalWorkflow.end(),
2962+
[&name = dp.name](DataProcessorSpec const& spec) { return spec.name == name; });
2963+
if (found == physicalWorkflow.end() || (*dp.metadata.begin()).value != currentWorkflow.executable) {
29642964
physicalWorkflow.push_back(dp);
29652965
rankIndex.insert(std::make_pair(dp.name, workflowHashB));
29662966
}

0 commit comments

Comments
 (0)