Skip to content

Commit 4ff804b

Browse files
fix drift settings (#2025)
* fix drift settings * Update ee/drift/controllers/drift.go Co-authored-by: bismuthdev[bot] <177057995+bismuthdev[bot]@users.noreply.github.com> --------- Co-authored-by: bismuthdev[bot] <177057995+bismuthdev[bot]@users.noreply.github.com>
1 parent e42e965 commit 4ff804b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

ee/drift/controllers/drift.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ func (mc MainController) ProcessAllDrift(c *gin.Context) {
203203
}
204204

205205
for _, org := range orgs {
206+
if org.DriftEnabled == false {
207+
log.Printf("Skipping org: %v because DriftEnabled=false", org.ID)
208+
continue
209+
}
206210
cron := org.DriftCronTab
207211
matches, err := utils2.MatchesCrontab(cron, time.Now())
208212
if err != nil {

ee/drift/controllers/notifications.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ func (mc MainController) ProcessAllNotifications(c *gin.Context) {
234234
}
235235

236236
for _, org := range orgs {
237+
if org.DriftEnabled == false {
238+
continue
239+
}
237240
cron := org.DriftCronTab
238241
matches, err := utils2.MatchesCrontab(cron, time.Now().Add((-7 * time.Minute)))
239242
if err != nil {

0 commit comments

Comments
 (0)