selinon.storages.memory module¶
In memory storage implementation.
-
class
selinon.storages.memory.
InMemoryStorage
(echo=False, json=False)[source]¶ Bases:
selinon.data_storage.DataStorage
Storage that stores results in memory without persistence.
-
delete
(flow_name, task_name, task_id)[source]¶ Delete result stored in storage.
Parameters: - flow_name – flow name in which task was executed
- task_name – task name that result is going to be retrieved
- task_id – id of the task that result is going to be retrieved
-
retrieve
(flow_name, task_name, task_id)[source]¶ Retrieve result stored in storage.
Parameters: - flow_name – flow name in which task was executed
- task_name – task name that result is going to be retrieved
- task_id – id of the task that result is going to be retrieved
Returns: task result
-
store
(node_args, flow_name, task_name, task_id, result)[source]¶ Store result stored in storage.
Parameters: - node_args – arguments that were passed to node
- flow_name – flow name in which task was executed
- task_name – task name that result is going to be stored
- task_id – id of the task that result is going to be stored
- result – result that should be stored
Returns: unique ID of stored record
-
store_error
(node_args, flow_name, task_name, task_id, exc_info)[source]¶ Store information about task error.
Parameters: - node_args – arguments that were passed to node
- flow_name – flow name in which task was executed
- task_name – task name that result is going to be stored
- task_id – id of the task that result is going to be stored
- exc_info – information about exception - tuple (type, value, traceback) as returned by sys.exc_info()
Returns: unique ID of stored record
-