Changeset View
Changeset View
Standalone View
Standalone View
swh/scheduler/interface.py
Show First 20 Lines • Show All 434 Lines • ▼ Show 20 Lines | ) -> List[OriginVisitStats]: | ||||
"""Retrieve the stats for an origin with a given visit type | """Retrieve the stats for an origin with a given visit type | ||||
If some visit_stats are not found, they are filtered out of the result. So the | If some visit_stats are not found, they are filtered out of the result. So the | ||||
output list may be of length inferior to the length of the input list. | output list may be of length inferior to the length of the input list. | ||||
""" | """ | ||||
... | ... | ||||
@remote_api_endpoint("visit_scheduler/get") | |||||
def visit_scheduler_queue_position_get(self,) -> Dict[str, datetime.datetime]: | |||||
"""Retrieve all current queue positions for the recurrent visit scheduler. | |||||
Returns | |||||
Mapping of visit type to their current queue position | |||||
""" | |||||
... | |||||
@remote_api_endpoint("visit_scheduler/set") | |||||
def visit_scheduler_queue_position_set( | |||||
self, visit_type: str, position: datetime.datetime | |||||
) -> None: | |||||
"""Set the current queue position of the recurrent visit scheduler for `visit_type`. | |||||
""" | |||||
... | |||||
@remote_api_endpoint("scheduler_metrics/update") | @remote_api_endpoint("scheduler_metrics/update") | ||||
def update_metrics( | def update_metrics( | ||||
self, | self, | ||||
lister_id: Optional[UUID] = None, | lister_id: Optional[UUID] = None, | ||||
timestamp: Optional[datetime.datetime] = None, | timestamp: Optional[datetime.datetime] = None, | ||||
) -> List[SchedulerMetrics]: | ) -> List[SchedulerMetrics]: | ||||
"""Update the performance metrics of this scheduler instance. | """Update the performance metrics of this scheduler instance. | ||||
Show All 20 Lines |