Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Framework/Core/scripts/dpl-mcp-server/dpl_mcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,10 @@ async def connect(port: int = 0, pid: int = 0, name: str = "") -> str:
_workflows[wf_name] = conn

devices = conn.snapshot.get("devices", [])
version = conn.snapshot.get("version", "unknown")
return (
f"Connected to workflow '{wf_name}' on port {port} "
f"({len(devices)} device(s))."
f"({len(devices)} device(s), version: {version})."
)


Expand Down Expand Up @@ -232,9 +233,10 @@ async def connect_hyperloop(url: str, name: str = "", token: str = "") -> str:
_workflows[wf_name] = conn

devices = conn.snapshot.get("devices", [])
version = conn.snapshot.get("version", "unknown")
return (
f"Connected to Hyperloop workflow '{wf_name}' via {ws_url} "
f"({len(devices)} device(s))."
f"({len(devices)} device(s), version: {version})."
)


Expand Down
5 changes: 4 additions & 1 deletion Framework/Core/src/StatusWebSocketHandler.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "Framework/DeviceStateEnums.h"
#include "Framework/LogParsingHelpers.h"
#include "Framework/Signpost.h"
#include "O2Version.h"
#include <algorithm>
#include <cstdio>
#include <string>
Expand Down Expand Up @@ -286,7 +287,9 @@ void StatusWebSocketHandler::sendSnapshot()

std::string out;
out.reserve(512 + specs.size() * 128);
out += R"({"type":"snapshot","devices":[)";
out += R"({"type":"snapshot","version":")";
out += jsonEscape(o2::gitRevision());
out += R"(","devices":[)";
for (size_t di = 0; di < specs.size(); ++di) {
if (di > 0) {
out += ',';
Expand Down