You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enabling autosaving to disk in a user-defined time interval.
The file content can be read using a new function "recover".
With each autosave, an automatic backup file (filename + ".tmp") is
created. that is used during recovery if the main file is broken.
Launch and rescue have access to the same dictionary. Each entry in this dictionary is stored as serialized data using the python internal 'pickle' method. The "launch" method runs in a seperate process so a fault in that process should not affect the data stored in the dictionary.
47
82
83
+
If the autosave parameters are set, the dictionary is compressed and saved in the specified time interval to the specified path. Throws an error if the autosave file already exists. After successful exit of the monitored application, the autosave file is deleted.
84
+
48
85
:param launch: The applications main method. Accepts faultguard data dictionary as first and args (if not None) as second parameter.
49
86
:param rescue: The method to call on a fault. Accepts faultguard data dictionary as first and args (if not None) as second parameter.
50
87
:param args: Data passed to launch and rescue methods.
88
+
:param autosave_interval: Time in seconds between each autosave of the `faultguard` dictionary.
89
+
:param autosave_file: Path to file to use for autosaves.
0 commit comments