Leo Kell
11/19/2021, 6:46 PMshould_execute
function. For example, I check for various conditions such as if certain environment variables are set before launching a pipeline, and if a run was skipped it sometimes takes some time for me to find out exactly why. Adding a mechanism for outputting messages here would help debug why runs were skipped.prha
11/19/2021, 7:32 PMScheduleDefinition
? The ScheduleDefinition
class takes in an execution_fn
argument that has the same signature as a sensor evaluation function. You can directly yield RunRequest
and SkipReason
objects from that function. https://docs.dagster.io/_apidocs/schedules-sensors#dagster.ScheduleDefinitionLeo Kell
11/19/2021, 7:49 PMschedule
decorator. Is there something similar I can use for that? If not, I think I should be able to use the ScheduleDefinition
instead.prha
11/19/2021, 7:54 PM@schedule
in favor of the execution_fn based decorator and keeping the decorator name to schedule
but that’s a breaking change and hadn’t figured out a reasonable transition plan.prha
11/19/2021, 7:55 PM0.14.0
?) and move the current @schedule
functionality to @legacy_schedule
or something like thatLeo Kell
11/19/2021, 7:56 PM@schedule
in that case.prha
12/02/2021, 11:29 PM0.13.10
which now supports using the @schedule
decorator with the RunRequest
based evaluation function. You can switch back to using that instead of manually constructing the ScheduleDefinition
. Something like this:
@schedule(cron_schedule="* * * * *", job=my_job)
def my_schedule(context):
if os.getenv("SHOULD_SKIP"):
yield SkipReason("skipping")
return
else:
yield RunRequest(run_config=..., tags=...)
return
Leo Kell
12/02/2021, 11:42 PM