mirror of https://github.com/apache/cloudstack.git
extract code
This commit is contained in:
parent
bfbb8bb1ef
commit
d6fe91347b
|
|
@ -970,12 +970,8 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
|
|||
|
||||
logger.trace("End cleanup expired async-jobs");
|
||||
|
||||
// 3) Cleanup orphaned networks stuck in Implementing state without async jobs
|
||||
try {
|
||||
cleanupOrphanedNetworks();
|
||||
} catch (Throwable e) {
|
||||
logger.error("Unexpected exception when trying to cleanup orphaned networks", e);
|
||||
}
|
||||
cleanupNetworksStuckInImplementing();
|
||||
|
||||
} catch (Throwable e) {
|
||||
logger.error("Unexpected exception when trying to execute queue item, ", e);
|
||||
}
|
||||
|
|
@ -983,6 +979,15 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
|
|||
};
|
||||
}
|
||||
|
||||
private void cleanupNetworksStuckInImplementing() {
|
||||
// Cleanup orphaned networks stuck in Implementing state without async jobs
|
||||
try {
|
||||
cleanupOrphanedNetworks();
|
||||
} catch (Throwable e) {
|
||||
logger.error("Unexpected exception when trying to cleanup orphaned networks", e);
|
||||
}
|
||||
}
|
||||
|
||||
@DB
|
||||
protected void expungeAsyncJob(final AsyncJobVO job) {
|
||||
Transaction.execute(new TransactionCallbackNoReturn() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue