rhtyd commented on a change in pull request #3462: Count Starting along with
Running VMs for user dispersing planner
URL: https://github.com/apache/cloudstack/pull/3462#discussion_r299910373
##########
File path: engine/schema/src/main/java/com/cloud/vm/dao/VMInstanceDaoImpl.java
##########
@@ -749,10 +749,10 @@ public Long countActiveByHostId(long hostId) {
}
@Override
- public Long countRunningByAccount(long accountId) {
- SearchCriteria<Long> sc = CountRunningByAccount.create();
+ public Long countRunningAndStartingByAccount(long accountId) {
+ SearchCriteria<Long> sc = CountRunningAndStartingByAccount.create();
sc.setParameters("account", accountId);
- sc.setParameters("state", State.Running);
+ sc.setParameters("states", new Object[] {State.Starting,
State.Running});
Review comment:
You can simply also write, `State.Starting, State.Running`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services