Charlie Bini
05/10/2023, 9:11 PMrun_failure_sensor
? I can identify the runs that I want to resume, but I'm not sure how to convert that into a RunRequest
. Here's the code I have so far
@run_failure_sensor
def run_execution_interrupted_sensor(context: RunFailureSensorContext):
run_requests = []
for event in context.get_step_failure_events():
if event.event_specific_data.error_source == ErrorSource.INTERRUPT:
...
run_requests.append(RunRequest(...))
return SensorResult(run_requests=run_requests)
Jordan
05/10/2023, 9:34 PMrun_failure_sensor
sean
05/11/2023, 12:19 PMCharlie Bini
05/11/2023, 2:46 PMsean
05/11/2023, 3:04 PMCharlie Bini
05/11/2023, 7:14 PMget_run_status
call and it's just hanginggql.transport.exceptions.TransportServerError: 401 Client Error: Unauthorized for url: <https://kipptaf.dagster.cloud/graphql>
@run_failure_sensor
def run_execution_interrupted_sensor(context: RunFailureSensorContext):
client = DagsterGraphQLClient(hostname="kipptaf.dagster.cloud")
for event in context.get_step_failure_events():
run_status = client.get_run_status(event.logging_tags["run_id"])
<http://context.log.info|context.log.info>(run_status)
Jordan
05/11/2023, 8:08 PMurl = "<http://127.0.0.1:3000/graphql>"
payload = {"query": graphql_query, "variables": variables}
headers = {"Content-Type": "application/json"}
response = requests.request("POST", url=url, json=payload, headers=headers)