RAFCON
RAFCON copied to clipboard
New execution history logging storage mechanism
A python shelf is not robust against, see #461.
For not robust systems (or systems with a battery, which can just power off) we need a new storage format, which can handle breakdowns.
A possible solution would be to append json strings (or something similar) to an already exisiting file.
Discussion open.
@SebastianRiedela @doem-an @franzlst @Rbelder
Originally created by @sebastian-brunner ([email protected]) at 2018-03-05 15:22:37+00:00 (moved from RMC internal repository)
I don't know how the execution logger currently registers a (proper) closing of the GUI.
Maybe it could help to make use of the signal_handler
(rafcon/gui/start.py
), which is called for various signals (SIGINT
, SIGHUP
, SIGQUIT
, SIGTERM
-- not SIGKILL
, I think this is not possible).
On the other hand, this signal_handler
already stops the execution, so I guess it also gracefully ends the logging?
Originally created by @franzlst ([email protected]) at 2018-03-06 08:25:48+00:00 (moved from RMC internal repository)
If the shelve cannot handle crashes and looking at the implementation of e.g. https://github.com/dagnelies/pysos, I'd propose a we code up a simple file and line-based log for rafcon.
What is stored in the shelve at the moment is a dictionary of history_item_id (string) -> history_item_info (dict, with possibly pickled data variables)
. We could store that line-based in a csv-fashion in the format:
history_item_id,pickle_string_of(history_item_info)\n
...
Originally created by SebastianRiedela ([email protected]) at 2018-03-06 09:05:30+00:00 (moved from RMC internal repository)