Skip to content

Commit 97bf318

Browse files
authored
Revert "DPL: switch to ws:// as default client for self hosted (#5535)" (#5561)
This reverts commit 8514bb0.
1 parent e495507 commit 97bf318

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

Framework/Core/include/Framework/DriverInfo.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,6 @@ struct DriverInfo {
145145
DeviceMetricsInfo metrics;
146146
/// Skip shared memory cleanup if set
147147
bool noSHMCleanup;
148-
/// Default value for the --driver-client-backend. Notice that if we start from
149-
/// the driver, the default backend will be the websocket one. On the other hand,
150-
/// if the device is started standalone, the default becomes the old stdout:// so
151-
/// that it works as it used to in AliECS.
152-
std::string defaultDriverClient = "invalid";
153148
};
154149

155150
struct DriverInfoHelper {

Framework/Core/src/DeviceSpecHelpers.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,7 @@ void DeviceSpecHelpers::prepareArguments(bool defaultQuiet, bool defaultStopped,
10371037
// has option --session been specified on the command line?
10381038
bool haveSessionArg = false;
10391039
using FilterFunctionT = std::function<void(decltype(argc), decltype(argv), decltype(od))>;
1040-
bool useDefaultWS = true;
1040+
bool useDefaultWS = false;
10411041

10421042
// the filter function will forward command line arguments based on the option
10431043
// definition passed to it. All options of the program option definition will be forwarded
@@ -1110,7 +1110,7 @@ void DeviceSpecHelpers::prepareArguments(bool defaultQuiet, bool defaultStopped,
11101110
}
11111111

11121112
haveSessionArg = haveSessionArg || varmap.count("session") != 0;
1113-
useDefaultWS = useDefaultWS && ((varmap.count("driver-client-backend") == 0) || varmap["driver-client-backend"].as<std::string>() == "ws://");
1113+
useDefaultWS = useDefaultWS || (varmap.count("driver-client-backend") != 0) && varmap["driver-client-backend"].as<std::string>() == "ws://";
11141114

11151115
for (const auto varit : varmap) {
11161116
// find the option belonging to key, add if the option has been parsed

Framework/Core/src/runDataProcessing.cxx

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -935,10 +935,7 @@ void doDefaultWorkflowTerminationHook()
935935
//LOG(INFO) << "Process " << getpid() << " is exiting.";
936936
}
937937

938-
int doChild(int argc, char** argv, ServiceRegistry& serviceRegistry,
939-
const o2::framework::DeviceSpec& spec,
940-
TerminationPolicy errorPolicy,
941-
std::string const& defaultDriverClient,
938+
int doChild(int argc, char** argv, ServiceRegistry& serviceRegistry, const o2::framework::DeviceSpec& spec, TerminationPolicy errorPolicy,
942939
uv_loop_t* loop)
943940
{
944941
fair::Logger::SetConsoleColor(false);
@@ -949,13 +946,13 @@ int doChild(int argc, char** argv, ServiceRegistry& serviceRegistry,
949946

950947
// Populate options from the command line. Notice that only the options
951948
// declared in the workflow definition are allowed.
952-
runner.AddHook<fair::mq::hooks::SetCustomCmdLineOptions>([&spec, defaultDriverClient](fair::mq::DeviceRunner& r) {
949+
runner.AddHook<fair::mq::hooks::SetCustomCmdLineOptions>([&spec](fair::mq::DeviceRunner& r) {
953950
boost::program_options::options_description optsDesc;
954951
ConfigParamsHelper::populateBoostProgramOptions(optsDesc, spec.options, gHiddenDeviceOptions);
955-
optsDesc.add_options()("monitoring-backend", bpo::value<std::string>()->default_value("default"), "monitoring backend info") //
956-
("driver-client-backend", bpo::value<std::string>()->default_value(defaultDriverClient), "backend for device -> driver communicataon: stdout://: use stdout, ws://: use websockets") //
957-
("infologger-severity", bpo::value<std::string>()->default_value(""), "minimum FairLogger severity to send to InfoLogger") //
958-
("configuration,cfg", bpo::value<std::string>()->default_value("command-line"), "configuration backend") //
952+
optsDesc.add_options()("monitoring-backend", bpo::value<std::string>()->default_value("default"), "monitoring backend info") //
953+
("driver-client-backend", bpo::value<std::string>()->default_value("stdout://"), "backend for device -> driver communicataon: stdout://: use stdout, ws://: use websockets") //
954+
("infologger-severity", bpo::value<std::string>()->default_value(""), "minimum FairLogger severity to send to InfoLogger") //
955+
("configuration,cfg", bpo::value<std::string>()->default_value("command-line"), "configuration backend") //
959956
("infologger-mode", bpo::value<std::string>()->default_value(""), "INFOLOGGER_MODE override");
960957
r.fConfig.AddToCmdLineOptions(optsDesc, true);
961958
});
@@ -1366,9 +1363,7 @@ int runStateMachine(DataProcessorSpecs const& workflow,
13661363
if (spec.id == frameworkId) {
13671364
return doChild(driverInfo.argc, driverInfo.argv,
13681365
serviceRegistry, spec,
1369-
driverInfo.errorPolicy,
1370-
driverInfo.defaultDriverClient,
1371-
loop);
1366+
driverInfo.errorPolicy, loop);
13721367
}
13731368
}
13741369
{
@@ -2231,10 +2226,8 @@ int doMain(int argc, char** argv, o2::framework::WorkflowSpec const& workflow,
22312226
if (varmap.count("id")) {
22322227
frameworkId = varmap["id"].as<std::string>();
22332228
driverInfo.uniqueWorkflowId = fmt::format("{}", getppid());
2234-
driverInfo.defaultDriverClient = "stdout://";
22352229
} else {
22362230
driverInfo.uniqueWorkflowId = fmt::format("{}", getpid());
2237-
driverInfo.defaultDriverClient = "ws://";
22382231
}
22392232
return runStateMachine(physicalWorkflow,
22402233
currentWorkflow,

0 commit comments

Comments
 (0)