Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2375 from alena1108/missingagentstate
Browse files Browse the repository at this point in the history
missing valid states for active hosts
  • Loading branch information
ibuildthecloud committed Jan 12, 2017
2 parents 50f2bc6 + 22b797d commit 6b26a4c
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -67,8 +67,10 @@ public boolean hasActiveHosts(Long accountId) {
.join(AGENT)
.on(AGENT.ID.eq(HOST.AGENT_ID))
.where(HOST.ACCOUNT_ID.eq(accountId)
.and(HOST.STATE.in(CommonStatesConstants.ACTIVATING, CommonStatesConstants.ACTIVE)
.and(AGENT.STATE.in(CommonStatesConstants.ACTIVATING, CommonStatesConstants.ACTIVE, AgentConstants.STATE_FINISHING_RECONNECT))))
.and(HOST.STATE.in(CommonStatesConstants.ACTIVATING, CommonStatesConstants.ACTIVE,
CommonStatesConstants.UPDATING_ACTIVE)
.and(AGENT.STATE.in(CommonStatesConstants.ACTIVATING, CommonStatesConstants.ACTIVE,
AgentConstants.STATE_FINISHING_RECONNECT, AgentConstants.STATE_RECONNECTED))))
.fetchOneInto(Integer.class) > 0;
}

Expand Down

0 comments on commit 6b26a4c

Please sign in to comment.