extract code

This commit is contained in:
Pearl Dsilva 2026-02-04 08:59:50 -05:00
parent bfbb8bb1ef
commit d6fe91347b
1 changed files with 11 additions and 6 deletions

View File

@ -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() {