Changeset View
Changeset View
Standalone View
Standalone View
python_modules/dagster-graphql/dagster_graphql/client/utils.py
Show All 14 Lines | Args: | ||||
Enum (str): can be either `ReloadRepositoryLocationStatus.SUCCESS` | Enum (str): can be either `ReloadRepositoryLocationStatus.SUCCESS` | ||||
or `ReloadRepositoryLocationStatus.FAILURE`. | or `ReloadRepositoryLocationStatus.FAILURE`. | ||||
""" | """ | ||||
SUCCESS = "SUCCESS" | SUCCESS = "SUCCESS" | ||||
FAILURE = "FAILURE" | FAILURE = "FAILURE" | ||||
class ShutdownRepositoryLocationStatus(Enum): | |||||
SUCCESS = "SUCCESS" | |||||
FAILURE = "FAILURE" | |||||
class ReloadRepositoryLocationInfo(NamedTuple): | class ReloadRepositoryLocationInfo(NamedTuple): | ||||
"""This class gives information about the result of reloading | """This class gives information about the result of reloading | ||||
a Dagster repository location with a GraphQL mutation. | a Dagster repository location with a GraphQL mutation. | ||||
Args: | Args: | ||||
status (ReloadRepositoryLocationStatus): The status of the reload repository location mutation | status (ReloadRepositoryLocationStatus): The status of the reload repository location mutation | ||||
failure_type: (Optional[str], optional): the failure type if `status == ReloadRepositoryLocationStatus.FAILURE`. | failure_type: (Optional[str], optional): the failure type if `status == ReloadRepositoryLocationStatus.FAILURE`. | ||||
Can be one of `ReloadNotSupported`, `RepositoryLocationNotFound`, or `RepositoryLocationLoadFailure`. Defaults to None. | Can be one of `ReloadNotSupported`, `RepositoryLocationNotFound`, or `RepositoryLocationLoadFailure`. Defaults to None. | ||||
message (Optional[str], optional): the failure message/reason if | message (Optional[str], optional): the failure message/reason if | ||||
`status == ReloadRepositoryLocationStatus.FAILURE`. Defaults to None. | `status == ReloadRepositoryLocationStatus.FAILURE`. Defaults to None. | ||||
""" | """ | ||||
status: ReloadRepositoryLocationStatus | status: ReloadRepositoryLocationStatus | ||||
failure_type: Optional[str] = None | failure_type: Optional[str] = None | ||||
message: Optional[str] = None | message: Optional[str] = None | ||||
class ShutdownRepositoryLocationInfo(NamedTuple): | |||||
"""This class gives information about the result of shutting down the server for | |||||
a Dagster repository location using a GraphQL mutation. | |||||
Args: | |||||
status (ShutdownRepositoryLocationStatus) Whether the shutdown succeeded or failed. | |||||
message (Optional[str], optional): the failure message/reason if | |||||
`status == ShutdownRepositoryLocationStatus.FAILURE`. Defaults to None. | |||||
""" | |||||
status: ShutdownRepositoryLocationStatus | |||||
message: Optional[str] = None | |||||
class PipelineInfo(NamedTuple): | class PipelineInfo(NamedTuple): | ||||
repository_location_name: str | repository_location_name: str | ||||
repository_name: str | repository_name: str | ||||
pipeline_name: str | pipeline_name: str | ||||
@staticmethod | @staticmethod | ||||
def from_node(node: Dict[str, Any]) -> List["PipelineInfo"]: | def from_node(node: Dict[str, Any]) -> List["PipelineInfo"]: | ||||
repo_name = node["name"] | repo_name = node["name"] | ||||
Show All 22 Lines |