*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 141bf6f0 authored by Schabbauer, Johannes's avatar Schabbauer, Johannes
Browse files

Making worker more robust to timeouts

parent 3553e0ff
No related branches found
No related tags found
No related merge requests found
......@@ -59,8 +59,9 @@ class TimeBaseWorker(Worker):
for i in range(1,self.num_AOM+1):
ch = f"CH-{i}"
self.client.send(ch.encode()+b"|Gpar\r\n")
Gpar = self.client.recv(1000).decode() # Rfreq:xxx|Rampl:xxx|Rout:xxx|...
time.sleep(0.2)
try:
Gpar = self.client.recv(1000).decode() # Rfreq:xxx|Rampl:xxx|Rout:xxx|...
# Create parameter dictionary from message string
par = dict(map(lambda str:str.split(":"),Gpar.split("|")[:-1]))
self.remote_values[ch]["freq"] = int(par["Rfreq"])
......
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