Changeset View
Changeset View
Standalone View
Standalone View
swh/web/common/typing.py
# Copyright (C) 2020 The Software Heritage developers | # Copyright (C) 2020-2021 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU Affero General Public License version 3, or any later version | # License: GNU Affero General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
from typing import Any, Dict, List, Optional, TypeVar, Union | from typing import Any, Dict, List, Optional, TypeVar, Union | ||||
from typing_extensions import TypedDict | from typing_extensions import TypedDict | ||||
▲ Show 20 Lines • Show All 209 Lines • ▼ Show 20 Lines | class RevisionMetadata(SWHObjectInfo, SWHObjectInfoMetadata): | ||||
type: str | type: str | ||||
snapshot: Optional[str] | snapshot: Optional[str] | ||||
TResult = TypeVar("TResult") | TResult = TypeVar("TResult") | ||||
PagedResult = CorePagedResult[TResult, str] | PagedResult = CorePagedResult[TResult, str] | ||||
class SaveOriginRequestInfo(TypedDict): | |||||
id: int | |||||
"""Unique key""" | |||||
save_request_date: str | |||||
"""Date of the creation request""" | |||||
visit_type: str | |||||
"""Type of the visit""" | |||||
visit_status: Optional[str] | |||||
"""Status of the visit""" | |||||
origin_url: str | |||||
"""Origin to ingest""" | |||||
save_request_status: str | |||||
"""Status of the request""" | |||||
loading_task_id: Optional[int] | |||||
"""Identifier of the loading task in the scheduler if scheduled""" | |||||
visit_date: Optional[str] | |||||
"""End of the visit if terminated""" | |||||
save_task_status: str | |||||
anlambert: +1, thanks ! | |||||
"""Status of the scheduled task""" |
+1, thanks !