WorkScheduler
QuantConnect.Lean.Engine.DataFeeds.WorkScheduling.WorkScheduler
Bases: Object
Base work scheduler abstraction
workers_count
workers_count: int = ...
The quantity of workers to be used
queue_work
queue_work(
symbol: Union[Symbol, str, BaseContract],
work_func: Callable[[int], bool],
weight_func: Callable[[], int],
) -> None
Add a new work item to the queue
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
Union[Symbol, str, BaseContract]
|
The symbol associated with this work |
required |
work_func
|
Callable[[int], bool]
|
The work function to run |
required |
weight_func
|
Callable[[], int]
|
The weight function. Work will be sorted in ascending order based on this weight |
required |