add time-of-day limitation to events.
continuous-integration/drone/push Build is failing

This commit is contained in:
2021-10-02 14:43:15 +02:00
parent b83673b2cc
commit 2abb4b1024
9 changed files with 236 additions and 18 deletions
+3
View File
@@ -93,6 +93,9 @@ func handleEvent(event models.Event) (responses []models.Event) {
if handler.EventName != event.Name {
continue
}
if !handler.IsWithinTimeRange() {
continue
}
devices, err := config.DeviceRepository().FetchByReference(ctx, handler.TargetKind, handler.TargetValue)
if err != nil {