ICommandHandler
QuantConnect.Commands.ICommandHandler
Bases: IDisposable
Represents a command queue for the algorithm. This is an entry point for external messages to act upon the running algorithm instance.
initialize
initialize(
job: AlgorithmNodePacket, algorithm: IAlgorithm
) -> None
Initializes this command queue for the specified job
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job
|
AlgorithmNodePacket
|
The job that defines what queue to bind to |
required |
algorithm
|
IAlgorithm
|
The algorithm instance |
required |
process_commands
process_commands() -> Iterable[CommandResultPacket]
Process any commands in the queue
Returns:
| Type | Description |
|---|---|
Iterable[CommandResultPacket]
|
The command result packet of each command executed if any. |