ron burgundy
03/11/2024, 11:57 PMdagster dev -w workspace.yaml
which blocks the UI from displaying. This is my job definition:
@job(name='myjob')
def backdate_item():
long_running_job()
defs = Definitions(
jobs=[backdate_item],
)
Dagster is calling long_running_job()
on startup, because if I were to raise an exception, Dagster won't start:
def long_running_job():
raise Exception("Why is it calling my code on startup?")
This is really inconvenient to have to run all jobs on startup.Zach
03/12/2024, 2:06 PMlong_running_job
? Is it a @graph
/ @op
? or something else?Zach
03/12/2024, 2:08 PM@job
or @graph
definition at the time your code is loaded. Dagster only expects you to use @ops
or @graphs
within a @job
or @graph
definition, and uses the ops / graphs in a job / graph definition to construct the dependency graph - this is how it shows you what your dependency tree looks like. If you only use ops and graph in your job definitions, execution of the actual job will be deferred until you actually run the jobron burgundy
03/12/2024, 3:07 PM