added error handling

This commit is contained in:
kennycud 2025-03-16 18:46:38 -07:00
parent e48fd96c1e
commit 4188f18a9a

View File

@ -58,17 +58,22 @@ public class ArbitraryDataCacheManager extends Thread {
try { try {
while (!Controller.isStopping()) { while (!Controller.isStopping()) {
Thread.sleep(500L); try {
Thread.sleep(500L);
// Process queue // Process queue
processResourceQueue(); processResourceQueue();
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
Thread.sleep(600_000L); // wait 10 minutes to continue
}
} }
} catch (InterruptedException e) {
// Fall through to exit thread
}
// Clear queue before terminating thread // Clear queue before terminating thread
processResourceQueue(); processResourceQueue();
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
} }
public void shutdown() { public void shutdown() {