https://dagster.io/ logo
#dagster-feedback
Title
# dagster-feedback
p

Pablo Beltran

03/21/2023, 7:44 PM
I have a few jobs for which I want the behavior to be 'this job is always running'. Currently the way I handle this is I have a job and a sensor that makes sure the job is always running. It would be nice to have a function or something that encapsulates all of this to simplify this.
m

Mark Fickett

03/21/2023, 8:35 PM
I would definitely have a use for 'start this again as soon as it finishes' too.
❤️ 1
t

Tobias Pankrath

03/22/2023, 7:10 AM
Can one generate a run request at the end of the op?
j

jamie

03/22/2023, 2:11 PM
Not exactly a single function, but one option to achieve this would be to have a run status sensor that only monitors the job in question and kicks off a run of that job in response
Copy code
@job
def my_job():
    ...

@run_status_sensor(
    run_status=DagsterRunStatus.SUCCESS,
    monitored_jobs=[my_job],
    request_job=[my_job]
)
def my_status_sensor():
    return RunRequest()