Skip to content

models

RepresentationSiteStateModel

Bases: OPModel

High level model to get all sites status on representations

Source code in server/settings/models.py
95
96
97
98
99
class RepresentationSiteStateModel(OPModel):
    """High level model to get all sites status on representations"""
    representationId: str = Field(...)
    siteName: str = Field(...)
    status: StatusEnum = Field(StatusEnum.NOT_AVAILABLE)

StatusEnum

Bases: IntEnum

-1 : State is not available 0 : Transfer in progress 1 : File is queued for Transfer 2 : Transfer failed 3 : Tranfer is paused 4 : File/representation is fully synchronized

Source code in server/settings/models.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
class StatusEnum(enum.IntEnum):
    """
    -1 : State is not available
    0 : Transfer in progress
    1 : File is queued for Transfer
    2 : Transfer failed
    3 : Tranfer is paused
    4 : File/representation is fully synchronized
    """

    NOT_AVAILABLE = -1
    IN_PROGRESS = 0
    QUEUED = 1
    FAILED = 2
    PAUSED = 3
    SYNCED = 4