Skip to content

Commit c9d7175

Browse files
committed
put the sleep in a finally block to ensure it executes. Need to change this to a trigger though.
1 parent 08f45de commit c9d7175

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

operators/read-tem-data/run.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ def read_data_ncempy(
4040
except Exception as e:
4141
logger.info(f"Problem loading file. Error: {e}")
4242
return None
43-
44-
# Send the data every 3 seonds
45-
# TODO: Use trigger instead of time.sleep to control when data is sent
46-
time.sleep(3.0)
43+
finally:
44+
# TODO: Use trigger instead of time.sleep to control when data is sent
45+
time.sleep(3.0) # wait to read it again.
4746

4847
# Process and return result if the data was loaded successfully
4948
data_bytes = data.tobytes()

0 commit comments

Comments
 (0)