https://dagster.io/ logo
Title
t

Timo

10/06/2022, 10:45 AM
Quick question: What happens if I set the "minimum_interval_seconds" of a sensor to 0? I intend to have a very quick reaction to an external event.
:dagster-bot-resolve: 1
v

Vinnie

10/06/2022, 11:48 AM
Per the docs:
It’s important to note that this interval represents a minimum interval between runs of the sensor and not the exact frequency the sensor runs. If you have a sensor that takes 30 seconds to complete, but the
minimum_interval_seconds
is 5 seconds, the fastest Dagster Daemon will run the sensor is every 35 seconds. The
minimum_interval_seconds
only guarantees that the sensor is not evaluated more frequently than the given interval.
I suppose this would cause the sensor to trigger immediately as soon as it finished executing
t

Timo

10/06/2022, 12:13 PM
I understand that like that too. I wonder if a value of 0 is forbidden because it "could freeze" something due to high load?
v

Vinnie

10/06/2022, 12:14 PM
could use 0.5 to be on the safe side I suppose
t

Timo

10/06/2022, 12:20 PM
It is typed Optional[int] !?
s

sandy

10/06/2022, 9:03 PM
as far as I know, we don't prevent 0, and it likely works, although supporting sensor evaluations at that frequency is not a design goal for us at this time