mirror of https://github.com/apache/cloudstack.git
Close transaction while fetching recent events
This commit is contained in:
parent
9eb8d538dd
commit
438f90a262
|
|
@ -124,6 +124,8 @@ public class UsageEventDaoImpl extends GenericDaoBase<UsageEventVO, Long> implem
|
|||
txn.rollback();
|
||||
s_logger.error("error copying events from cloud db to usage db", ex);
|
||||
throw new CloudRuntimeException(ex.getMessage());
|
||||
} finally {
|
||||
txn.close();
|
||||
}
|
||||
|
||||
// Copy event details from cloud db to usage db
|
||||
|
|
@ -150,6 +152,8 @@ public class UsageEventDaoImpl extends GenericDaoBase<UsageEventVO, Long> implem
|
|||
txn.rollback();
|
||||
s_logger.error("error copying event details from cloud db to usage db", ex);
|
||||
throw new CloudRuntimeException(ex.getMessage());
|
||||
} finally {
|
||||
txn.close();
|
||||
}
|
||||
|
||||
return findRecentEvents(endDate);
|
||||
|
|
|
|||
Loading…
Reference in New Issue