Thierry Hue
12/15/2022, 8:57 AM@run_status_sensor(run_status=DagsterRunStatus.CANCELED)
def job_canceled_sensor(context: RunStatusSensorContext):
prometheus = PrometheusClient()
status = 'canceled'
logger = get_dagster_logger(name='JOB_STATUS_SENSOR')
<http://logger.info|logger.info>(f"job_canceled_sensor - {context.dagster_run.job_name} - {status}")
prometheus.change_job_state(context.dagster_run.job_name, status)
prometheus.pushadd_to_gateway(job_name=context.dagster_run.job_name)
But then when I terminate the job via the UI, the job state is CANCELED but the sensor is not triggered.
Am I doing something wrong?prha
12/15/2022, 4:36 PMThierry Hue
12/16/2022, 11:38 AMCanceled
state without the sensor being called