Nicholas Chammas
08/09/2021, 4:33 PMparameter_defaults
, where the defaults are derived from the date that the schedule is triggered on. In other words, I’m looking for something like this:
schedule = Schedule(
clocks=[
IntervalClock(
interval=timedelta(days=1),
parameter_defaults={"version": date.today().isoformat()},
),
],
...
Except I don’t want date.today().isoformat()
to be calculated just once when the flow is registered and then fixed for all time. I want it to be calculated at the time the clock fires.
How do I do this? Pass in a lambda as the value in the parameter_defaults
dictionary? Construct a dict-like object that calculates the value on key lookup?
I feel like I’m thinking about this incorrectly.Kevin Kho
Nicholas Chammas
08/09/2021, 4:52 PMKevin Kho