Changeset View
Changeset View
Standalone View
Standalone View
swh/scheduler/interface.py
Show First 20 Lines • Show All 305 Lines • ▼ Show 20 Lines | ) -> PaginatedListedOriginList: | ||||
`lister_id`, or both arguments. | `lister_id`, or both arguments. | ||||
Use the `limit` and `page_token` arguments for continuation. The next | Use the `limit` and `page_token` arguments for continuation. The next | ||||
page token, if any, is returned in the PaginatedListedOriginList object. | page token, if any, is returned in the PaginatedListedOriginList object. | ||||
""" | """ | ||||
... | ... | ||||
@remote_api_endpoint("origins/grab_next") | @remote_api_endpoint("origins/grab_next") | ||||
def grab_next_visits(self, count: int, policy: str,) -> List[ListedOrigin]: | def grab_next_visits( | ||||
"""Get at most the `count` next origins that need to be visited | self, visit_type: str, count: int, policy: str | ||||
according to the given scheduling `policy`. | ) -> List[ListedOrigin]: | ||||
"""Get at most the `count` next origins that need to be visited with | |||||
the `visit_type` loader according to the given scheduling `policy`. | |||||
This will mark the origins as "being visited" in the listed_origins | This will mark the origins as "being visited" in the listed_origins | ||||
table, to avoid scheduling multiple visits to the same origin. | table, to avoid scheduling multiple visits to the same origin. | ||||
""" | """ | ||||
... | ... | ||||
@remote_api_endpoint("priority_ratios/get") | @remote_api_endpoint("priority_ratios/get") | ||||
def get_priority_ratios(self): | def get_priority_ratios(self): | ||||
Show All 14 Lines |