Skip to content
Snippets Groups Projects
Commit 1b1c8a52 authored by Emanuele Laface's avatar Emanuele Laface
Browse files

Fixed single variable request

parent e43678cc
No related branches found
Tags 1.2.5
No related merge requests found
Pipeline #109452 passed
......@@ -49,11 +49,14 @@ def epics_callback(name, value):
def get_pvget(pvlist: str):
global monitored_pvs
global monitored_epics
result_pvs = {}
pvnames = pvlist.split(",")
for pv in pvnames:
if pv not in monitored_epics:
monitored_epics[pv] = epics_ctxt.monitor(pv, partial(epics_callback, pv))
return json.loads(json.dumps(monitored_pvs).replace("NaN", "null"))
if pv in monitored_pvs:
result_pvs[pv] = monitored_pvs[pv]
return json.loads(json.dumps(result_pvs).replace("NaN", "null"))
@app.get("/api/v2/cleanpvs")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment