Skip to content

Commit

Permalink
fix(api): take care of not executed for migration status (#4905)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardlt authored and sguiheux committed Jan 23, 2020
1 parent 39d9030 commit d9a2517
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engine/api/migrate/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ func CleanMigrationsList() {

// Status returns monitoring status, if there are cds migration in progress it returns WARN
func Status(db gorp.SqlExecutor) sdk.MonitoringStatusLine {
count, err := db.SelectInt("SELECT COUNT(id) FROM cds_migration WHERE status <> $1 AND status <> $2", sdk.MigrationStatusDone, sdk.MigrationStatusCanceled)
count, err := db.SelectInt("SELECT COUNT(id) FROM cds_migration WHERE status <> $1 AND status <> $2 AND status <> $3",
sdk.MigrationStatusDone, sdk.MigrationStatusCanceled, sdk.MigrationStatusNotExecuted)
if err != nil {
return sdk.MonitoringStatusLine{Component: "CDS Migration", Status: sdk.MonitoringStatusWarn, Value: fmt.Sprintf("KO Cannot request in database : %v", err)}
}
Expand Down

0 comments on commit d9a2517

Please sign in to comment.