Skip to content

Commit 8f4f246

Browse files
committed
fix: panics
1 parent e37b076 commit 8f4f246

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

internal/services/controllers/olap/process_dag_status_updates.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,15 @@ func (o *OLAPControllerImpl) runDAGStatusUpdates(ctx context.Context) func() {
5353
return
5454
}
5555

56-
err = o.notifyDAGsUpdated(ctx, rows)
56+
migrationDisabled := os.Getenv("MIGRATION_DISABLE_EXTRA") == "true"
5757

58-
if err != nil {
59-
o.l.Error().Err(err).Msg("failed to notify updated DAG statuses")
60-
return
58+
if !migrationDisabled {
59+
err = o.notifyDAGsUpdated(ctx, rows)
60+
61+
if err != nil {
62+
o.l.Error().Err(err).Msg("failed to notify updated DAG statuses")
63+
return
64+
}
6165
}
6266
}
6367

internal/services/controllers/olap/process_task_status_updates.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,15 @@ func (o *OLAPControllerImpl) runTaskStatusUpdates(ctx context.Context) func() {
8181
return
8282
}
8383

84-
err = o.notifyTasksUpdated(ctx, rows)
84+
migrationDisabled := os.Getenv("MIGRATION_DISABLE_EXTRA") == "true"
8585

86-
if err != nil {
87-
o.l.Error().Err(err).Msg("failed to notify updated task statuses")
88-
return
86+
if !migrationDisabled {
87+
err = o.notifyTasksUpdated(ctx, rows)
88+
89+
if err != nil {
90+
o.l.Error().Err(err).Msg("failed to notify updated task statuses")
91+
return
92+
}
8993
}
9094
}
9195
}

0 commit comments

Comments
 (0)