ding.interaction.slave.action¶
ding.interaction.slave.action
¶
ConnectionRefuse
¶
Bases: ResponsibleException
Overview
Exception represents the refuse to connection to slave from master, can be used in method _before_connection.
Example: - Without data
>>> raise ConnectionRefuse
- With refuse data
>>> raise ConnectionRefuse({'data': 233})
__init__(data=None)
¶
Overview
Constructor of ConnectionRefuse
Arguments:
- data (:obj:Optional[Mapping[str, Any]]): Key-value-formed refuse data
DisconnectionRefuse
¶
Bases: ResponsibleException
Overview
Exception represents the refuse to disconnection to slave from master,
can be used in method _before_disconnection.
Example: - Without data
>>> raise DisconnectionRefuse
- With refuse data
>>> raise DisconnectionRefuse({'data': 233})
__init__(data=None)
¶
Overview
Constructor of DisconnectionRefuse
Arguments:
- data (:obj:Optional[Mapping[str, Any]]): Key-value-formed refuse data
TaskRefuse
¶
Bases: ResponsibleException
Overview
Exception represents the refuse to tasks, can be used in method _before_task.
Example: - Without data
>>> raise TaskRefuse
- With refuse data
>>> raise TaskRefuse({'data': 233})
__init__(data=None)
¶
Overview
Constructor of TaskRefuse
Arguments:
- data (:obj:Optional[Mapping[str, Any]]): Key-value-formed refuse data
TaskFail
¶
Bases: Exception
Overview
Exception represents the failure of tasks, can be used in method _process_task.
Example: - Without data
>>> raise TaskFail
- With failure data
>>> raise TaskFail({'data': 233})
- With both data and message
>>> raise TaskFail({'data': 233}, 'this is message')
Full Source Code
../ding/interaction/slave/action.py