Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 91b: fixes for the auto grouping implementation #93

Merged
merged 2 commits into from
Dec 18, 2023
Merged
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
9 changes: 4 additions & 5 deletions sardananxsrecorder/nxsrecorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,9 +1195,9 @@ def __appendSciCatDataset(self, hostname=None):
if isinstance(variables, dict) and "entryname" in variables:
entryname = variables["entryname"]
try:
scanname = bfname % ""
scanname, _ = os.path.splitext(bfname % "")
except Exception:
scanname = bfname
scanname, _ = os.path.splitext(bfname)

if appendentry is True:
sid = self.__getEnvVar("ScanID", 0)
Expand All @@ -1208,7 +1208,6 @@ def __appendSciCatDataset(self, hostname=None):
grouping = bool(self.__getEnvVar('SciCatAutoGrouping', False))
if grouping:
commands = []
fdir = self.__getEnvVar('ScanDir')
try:
sm = dict(self.__getEnvVar('SciCatMeasurements', {}))
except Exception:
Expand All @@ -1218,13 +1217,13 @@ def __appendSciCatDataset(self, hostname=None):
cgrp = sm[fdir]
if cgrp != scanname:
commands.append("__command__ stop")
commands.append(cgrp)
commands.append("%s:%s" % (cgrp, time.time()))
commands.append("__command__ start %s" % scanname)
else:
commands.append("__command__ start %s" % scanname)
commands.append(sname)
commands.append("__command__ stop")
commands.append(scanname)
commands.append("%s:%s" % (scanname, time.time()))
commands.append("__command__ start %s" % scanname)
sname = "\n".join(commands)

Expand Down
Loading