I have two dagster jobs (running ML training and ...
# ask-community
p
I have two dagster jobs (running ML training and predictions). Is it possible to now create a graph that links the two dagster jobs? I want to have it also in a way that if one job fails, the subsequent one also does not get executed.
d
commenting to follow the discussion
j
you can link the jobs using a run status sensor. The idea is that you could write the sensor to run when the first job succeeds, and the sensor would launch a run of the second job https://docs.dagster.io/concepts/partitions-schedules-sensors/sensors#run-status-sensors
D 2
p
I will have a look!
Can the
run_status_sensor
be connected to a particular job/schedule? i.e. only run when a particular job succeeds?
j
yeah, you can use the
monitored_jobs
argument to the
run_status_sensor
decorator to specify the jobs to watch
p
Ah ok, but if I have multiple instances of the same job running, would it react to all of them? Can I tie it to a particular instance of the job?