Michel Rouly06/16/2021, 7:03 PM
, and I have the same function (copy/paste) passed into an explicit
call as the
. But the decorated function is working, whereas the
instance I'm constructing is not doing anything. Specifically, it sets up and runs as a sensor, but it's not invoking the
as far as I can tell. Any idea what I need to do before calling
if I'm not able to use
? Would be super helpful 🙂
daniel06/16/2021, 7:04 PM
Michel Rouly06/16/2021, 7:05 PM
Something like this.
@sensor( name="update_clustering_sensor", pipeline_name="update_clustering_pipeline", mode="s3", minimum_interval_seconds=10, ) def decorated_sensor(context: SensorExecutionContext) -> Generator: print("decorated_sensor") yield SkipReason("No solids were added or updated.") def build_sensor(mode: str) -> SensorDefinition: return SensorDefinition( name="update_clustering_sensor", pipeline_name="update_clustering_pipeline", mode=mode, minimum_interval_seconds=30, evaluation_fn=sensor_fn, ) def sensor_fn(context: SensorExecutionContext) -> Generator: print("sensor_fn") yield SkipReason("No solids were added or updated.")
as I've done in
printed out during sensor execution.
daniel06/16/2021, 7:08 PM
Michel Rouly06/16/2021, 7:08 PM
daniel06/16/2021, 7:10 PM
(with parens) where you had
(without parens) before?
Michel Rouly06/16/2021, 7:10 PM
prha06/16/2021, 7:12 PM
Michel Rouly06/16/2021, 7:12 PM
that may be relevant? There's also the
parameterizes, but I'm not.
daniel06/16/2021, 7:13 PM
Michel Rouly06/16/2021, 7:18 PM
that used to work back in our repo definition, we're just actually not even seeing ticks anymore. Something strange is afoot. Will update.
daniel06/16/2021, 7:22 PM
Michel Rouly06/16/2021, 7:25 PM
2021-06-16 15:24:39 - BackfillDaemon - INFO - No backfill jobs requested. 2021-06-16 15:24:39 - SchedulerDaemon - INFO - Not checking for any runs since no schedules have been started.
and restarted the daemon and dagit and our sensor is back to working.
a second time, our
based sensor is working as expected.
directly does work, but either that or simply having multiple sensors of the same names active at different times (i.e., not concurrently) may corrupt the
prha06/16/2021, 7:35 PM
? sqlite? postgres?
Michel Rouly06/16/2021, 7:35 PM
prha06/16/2021, 7:43 PM
version successfully without blowing away dagster home or even restarting the daemon
Michel Rouly06/16/2021, 7:46 PM
directory if analysis on that would be helpful, we backed it up before blowing it away