Skip to content

Commit

Permalink
#1233 Fix API heath status
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Apr 6, 2020
1 parent 6e07983 commit 809c6b5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions thehive-backend/app/controllers/StatusCtrl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ class StatusCtrl @Inject()(
case 1 HealthStatus.Warning
case _ HealthStatus.Error
}
connectorStatus = connectors.map(c c.health).toSeq
distinctStatus = connectorStatus :+ dbStatus
distinctStatus = connectors.map(c c.health) + dbStatus
globalStatus = if (distinctStatus.contains(HealthStatus.Ok)) {
if (distinctStatus.size > 1) HealthStatus.Warning else HealthStatus.Ok
} else if (distinctStatus.contains(HealthStatus.Error)) HealthStatus.Error
Expand Down

0 comments on commit 809c6b5

Please sign in to comment.