MATLAB Python

recoveryManager

Syntax

[running, latest_sess_info] = recoveryManager()

Description

RECOVERYMANAGER checks to see whether any datastructs are still "open" based on calls to startSession and endSession. If any datastructs have not been closed, "running" returns true, and "latest_sess_info" contains a cell array of the open datastructs loaded from disk (all of the easyFunctions write to disk after each trial, or even within trial). This session info is stored in the "active_session_info" file in your Participant Data folder. This is, in effect, a tool for recovering from crashes, power outages, or other misfortunes that could befall your experiment without creating a terrible mess that will take you days to untangle. But, it will be up to you to properly handle the interrupted session data in your experiment, if at all. See "demoRecovery" for one implementation in which the appropriate experiment is automatically relaunched, jumps to the most recently completed trial, and simply resumes calls to easyFunctions using the restored datastructs. See "help startSession" and "help endSession" for more details on these supporting functions.

Output

running: a boolean indicating whether any experiments are still running. Returns true if any datastructs have not been closed. latest_sess_info: a cell array containing the open datastructs loaded from disk. If no datastructs are open, latest_sess_info is an empty array.