Hey folks.  TLDR first, more context below.

rawwar has suggested that the interval on a new DeadlineAlert should default to 
0.  I can see a usecase for that but I don't feel like that should be the 
default.  What say you?

For some context, as of right now the interval is not optional and does not 
have a default.  Defining a new DeadlineAlert looks something like this:


# Some time after a dynamic reference
DeadlineAlert(
    reference=DeadlineReference.DAGRUN_QUEUED_AT,
    interval=timedelta(hours=1),
    callback=my_warning_callback
)


# Some time before or after a static reference datetime
DeadlineAlert(
    reference=DeadlineReference.FIXED_DATETIME(morning_meeting_datetime),
    interval=timedelta(minutes=-20),
    callback=going_to_be_close_callback
)


# At a static reference datetime

DeadlineAlert(
    reference=DeadlineReference.FIXED_DATETIME(morning_meeting_datetime),
    interval=timedelta(minutes=0),
    callback=deadline_missed_callback
)


So setting it to 0 is certainly a viable usecase with a fixed reference, but 
personally I don't see it as the default situation.  Throwing it out there for 
discussion to see if I'm missing some usecases and to make sure I'm not just 
being defensive about my original approach.


 - ferruzzi

Reply via email to