Changeset View
Changeset View
Standalone View
Standalone View
swh/scheduler/interface.py
Show First 20 Lines • Show All 303 Lines • ▼ Show 20 Lines | ) -> PaginatedListedOriginList: | ||||
"""Get information on the listed origins matching either the `url` or | """Get information on the listed origins matching either the `url` or | ||||
`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") | |||||
def grab_next_visits(self, count: int, policy: str,) -> List[ListedOrigin]: | |||||
"""Get at most the `count` next origins that need to be visited | |||||
according to the given scheduling `policy`. | |||||
This will mark the origins as "being visited" in the listed_origins | |||||
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): | ||||
... | ... |