need to ensure channel order for all steps, results should be unique

This commit is contained in:
2021-07-25 16:43:33 +02:00
parent 80ba7ade24
commit f40aa9ef82
+4 -3
View File
@@ -13,11 +13,12 @@ class PVChannels(Channels):
def check_status(channels, timeout=None):
pvs = [epics.get_pv(ch) for ch in set(channels)]
channels = sorted(channels)
pvs = [epics.get_pv(ch) for ch in channels]
states = [pv.wait_for_connection(timeout=timeout) for pv in pvs]
online = sorted(ch for ch, connected in zip(channels, states) if connected)
offline = sorted(ch for ch, connected in zip(channels, states) if not connected)
online = set(ch for ch, connected in zip(channels, states) if connected)
offline = set(ch for ch, connected in zip(channels, states) if not connected)
return online, offline