Skip to content

Commit

Permalink
fix: removed unused function parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
baumann-t committed May 20, 2024
1 parent ff560cf commit 020a719
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -398,19 +398,18 @@ def terminate_run(self, run_id: str):
else:
raise DagsterGraphQLClientError(query_result_type, query_result["message"])

def terminate_runs(self, run_ids: List[str], termination_policy: str = "SAFE_TERMINATE"):
def terminate_runs(self, run_ids: List[str]):
"""Terminates a list of pipeline runs. This method it is useful when you would like to stop a list of pipeline runs
based on a external event.
Args:
run_ids (List[str]): The list run ids of the pipeline runs to terminate
termination_policy (str): The termination policy to use. Defaults to "SAFE_TERMINATE"
"""
check.list_param(run_ids, "run_ids", of_type=str)

res_data: Dict[str, Dict[str, Any]] = self._execute(
TERMINATE_RUNS_JOB_MUTATION,
{"runIds": run_ids, "terminationPolicy": termination_policy},
{"runIds": run_ids},
)

query_result: Dict[str, Any] = res_data["terminateRuns"]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
mutation GraphQLClientSubmitRun($executionParams: ExecutionParams!) {
launchPipelineExecution(executionParams: $executionParams) {
__typename
... on InvalidStepError {
invalidStepKey
}
... on InvalidOutputError {
stepKey
invalidOutputName
}
... on LaunchPipelineRunSuccess {
run {
runId
}
}
... on ConflictingExecutionParamsError {
message
}
... on PresetNotFoundError {
message
}
... on PipelineRunConflict {
message
}
... on PipelineConfigValidationInvalid {
errors {
__typename
message
path
reason
}
}
... on PipelineNotFoundError {
message
}
... on PythonError {
message
}
... on UnauthorizedError {
message
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
query GraphQLClientGetRunStatus($runId: ID!) {
pipelineRunOrError(runId: $runId) {
__typename
... on PipelineRun {
status
}
... on PipelineRunNotFoundError {
message
}
... on PythonError {
message
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
mutation GraphQLClientReloadCodeLocation($repositoryLocationName: String!) {
reloadRepositoryLocation(repositoryLocationName: $repositoryLocationName) {
__typename
... on WorkspaceLocationEntry {
name
locationOrLoadError {
__typename
... on RepositoryLocation {
isReloadSupported
repositories {
name
}
}
... on PythonError {
message
}
}
}
... on ReloadNotSupported {
message
}
... on RepositoryLocationNotFound {
message
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
mutation GraphQLClientShutdownCodeLocation($repositoryLocationName: String!) {
shutdownRepositoryLocation(repositoryLocationName: $repositoryLocationName) {
__typename
... on PythonError {
message
}
... on RepositoryLocationNotFound {
message
}
}
}
2 changes: 0 additions & 2 deletions python_modules/libraries/dagster-looker/.coveragerc

This file was deleted.

0 comments on commit 020a719

Please sign in to comment.