deep.processor.context.action_context
Handling for action context.
ActionContext
Bases: ABC
A context for the processing of an action.
Source code in deep/processor/context/action_context.py
__enter__()
__exit__(exception_type, exception_value, exception_traceback)
__init__(parent, action)
Create a new action context.
:param parent: the parent trigger :param action: the action config
Source code in deep/processor/context/action_context.py
can_trigger()
Check if the action can trigger.
Combine checks for rate limits, windows and condition. :return: True, if the trigger can be triggered.
Source code in deep/processor/context/action_context.py
eval_watch(watch, source)
Evaluate an expression in the current frame.
:param source: The watch source. :param watch: The watch expression to evaluate. :return: Tuple with WatchResult, collected variables, and the log string for the expression
Source code in deep/processor/context/action_context.py
has_triggered()
Check if we have triggerd during this context.
:return: True, if the trigger has been fired.
process()
process_capture_variable(name, variable)
Process a captured variable (exception or return), into a variable set.
:param name: the name to use (raised or returned) :param variable: the value to process :return: Tuple with WatchResult, collected variables, and the log string for the expression
Source code in deep/processor/context/action_context.py
NoActionContext
Bases: ActionContext
Default context if no action can be determined.