Bernardo Cortez
07/13/2022, 5:57 PMshould_execute
argument of the schedule
decorator with dagit? I have inserted a condition for my schedule not to run on weekends, but I can still see the runs scheduled for this next weekend... I wonder whether there is a problem with the implementation or the runs will be skipped when the time comesyuhan
07/13/2022, 8:13 PMfrom dagster import build_schedule_context
execution_time = datetime(year=2019, month=2, day=27)
context_with_time = build_schedule_context(scheduled_execution_time=execution_time)
execution_data = always_skip_schedule.evaluate_tick(context_with_time)
assert execution_data.skip_message
assert (
execution_data.skip_message
== "should_execute function for always_skip_schedule returned false."
)
this is how we test it in our unit testsDagster Bot
07/13/2022, 8:14 PMyuhan
07/13/2022, 8:16 PMBernardo Cortez
07/14/2022, 1:58 PM