Scan state in Nexus file, Nexus state in Redis
After a short discussion with @meyer we found that two questions often come up related to launching online data processing:
-
Data processing wants to skip scans that are stopped (or crashed) before normal finalization. For that this information needs to be in Redis and in the HDF5 file (depends how the data processing is launched). For Redis the END_SCAN event could have this information in its associated data (passed when we emit the event in Bliss). Then the writer can also save that somehow in the file.
-
To start data processing at the end of the scan based on the HDF5 file, you need to know when the writer has finished writing the scan. You can listen to Redis for the END_SCAN event and call the writer tango server to check whether the writing has finished. However, as we already listen to Redis it may be easier to have the writer publish its scan state in Redis (busy, finished successfully, finished unsuccessfully, ...).