mirror of https://github.com/apache/cloudstack.git
Remove transaction from updateCapacityForHost cal (#12421)
This commit is contained in:
parent
6a324da27a
commit
5c1f9315ce
|
|
@ -294,13 +294,8 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi
|
||||||
Math.min(CapacityManager.CapacityCalculateWorkers.value(), hostIds.size())));
|
Math.min(CapacityManager.CapacityCalculateWorkers.value(), hostIds.size())));
|
||||||
for (Long hostId : hostIds) {
|
for (Long hostId : hostIds) {
|
||||||
futures.put(hostId, executorService.submit(() -> {
|
futures.put(hostId, executorService.submit(() -> {
|
||||||
Transaction.execute(new TransactionCallbackNoReturn() {
|
final HostVO host = hostDao.findById(hostId);
|
||||||
@Override
|
_capacityMgr.updateCapacityForHost(host);
|
||||||
public void doInTransactionWithoutResult(TransactionStatus status) {
|
|
||||||
final HostVO host = hostDao.findById(hostId);
|
|
||||||
_capacityMgr.updateCapacityForHost(host);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return null;
|
return null;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue