Skip to content

Commit 16293ef

Browse files
committed
fix trial
1 parent 7ce1269 commit 16293ef

1 file changed

Lines changed: 51 additions & 25 deletions

File tree

server/src/main/java/com/cloud/api/query/QueryManagerImpl.java

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2461,39 +2461,65 @@ private Pair<List<AccountJoinVO>, Integer> searchForAccountsInternal(ListAccount
24612461
}
24622462

24632463

2464-
2465-
@Override
2466-
public boolean isReadyForShutdown(ReadyForShutdownCmd cmd) {
2467-
2468-
Pair<List<AsyncJobJoinVO>, Integer> result = pendingasyncjob(cmd);
2469-
2464+
@Override
2465+
public boolean isReadyForShutdown(ReadyForShutdownCmd cmd){
24702466

2471-
//add additional steps if required
2472-
Integer count = result.second();
2473-
if (count.intValue() == 0){
2474-
2475-
return true;
2476-
}
2477-
2478-
else {
2467+
Pair<List<AsyncJobJoinVO>, Integer> result = pendingasyncjob(cmd);
24792468

2480-
return false;
2481-
}
2482-
}
2469+
//add additional steps if required
2470+
Integer count = result.second();
2471+
if (count.intValue == 0){
2472+
return true;
2473+
}
2474+
else{
2475+
return false;
24832476

2484-
private Pair<List<AsyncJobJoinVO>, Integer> pendingasyncjob(ReadyForShutdownCmd cmd){
2485-
2486-
2487-
Filter searchFilter = new Filter(AsyncJobJoinVO.class, "id", true, null, null);
2477+
}
2478+
2479+
}
2480+
2481+
private Pair<List<AsyncJobJoinVo>, Integer> pendingasyncjob(cmd)
2482+
{
2483+
2484+
Filter searchFilter = new Filter(AsyncJobJoinVO.class, "id", true, null, null);
24882485
SearchBuilder<AsyncJobJoinVO> sb = _jobJoinDao.createSearchBuilder();
24892486

2490-
sb.and("jobStatus",sb.entity.getJobStatus(),SearchCriteria.Op.NULL);//can be broken into 2 steps incase more apt i.e. sb.and("jobstatus",sb.entity.getjobstatus(),SearchCriteria.op.EQ)
2491-
// sb.addOr("jobstatus", SearchCriteria.Op.NULL)
2487+
sb.and("jobstatus", sb.entity.getJobStatus(),SearchCriteria.Op.NULL); //can be broken into 2 steps incase more apt i.e. sb.and("jobstatus", sb.entity.getjobstatus(), SearchCriteria.Op.EQ)
24922488
SearchCriteria<AsyncJobJoinVO> sc = sb.create();
2493-
return _jobJoinDao.searchAndCount(sc, searchFilter);
2489+
return _jobJoinDao.searchAndCount(sc.searchFilter);
2490+
2491+
2492+
2493+
2494+
2495+
2496+
2497+
}
2498+
2499+
2500+
2501+
2502+
2503+
2504+
2505+
2506+
2507+
2508+
2509+
2510+
2511+
2512+
2513+
2514+
2515+
2516+
2517+
2518+
2519+
24942520

2495-
}
24962521

2522+
}
24972523

24982524

24992525

0 commit comments

Comments
 (0)