Class ObservableCommandInstance¶
- class sila2.server.ObservableCommandInstance(execution_uuid: UUID, execution_info_queue: Queue[CommandExecutionInfo], logger: logging.Logger, lifetime_of_execution: timedelta | None)¶
Instance of a currently running observable command. Provides means to update the execution information.
- begin_execution() None ¶
Observable commands start with the status
waiting
. Use this method to set the status torunning
. This is done automatically if the progress is set to a number greater than 0.
- property progress: float | None¶
Command execution progress. Must be
None
, or a number between 0 and 1. Clients are notified about updates.
Class ObservableCommandInstanceWithIntermediateResponses¶
- class sila2.server.ObservableCommandInstanceWithIntermediateResponses(execution_uuid: UUID, execution_info_queue: Queue[CommandExecutionInfo], intermediate_response_queue: Queue[IntermediateResponseType], logger: logging.Logger, lifetime_of_execution: timedelta | None)¶
Instance of a currently running observable command. Provides means to update the execution information and send intermediate responses.
- begin_execution() None ¶
Observable commands start with the status
waiting
. Use this method to set the status torunning
. This is done automatically if the progress is set to a number greater than 0.
- property estimated_remaining_time: timedelta | None¶
Command execution progress. Must be
None
, or a positive timedelta. Clients are notified about updates.
- property lifetime_of_execution: timedelta | None¶
Lifetime of the command execution. Must be
None
, or a positive timedelta. Clients are notified about updates.