mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 05:48:04 +01:00
Add timeouts to crawl chunk join()s
This commit is contained in:
@@ -61,7 +61,9 @@ public class AccountCleaner extends AccountDatabaseCrawlerListener {
|
||||
.toList();
|
||||
|
||||
try {
|
||||
CompletableFuture.allOf(deletionFutures.toArray(new CompletableFuture[0])).join();
|
||||
CompletableFuture.allOf(deletionFutures.toArray(new CompletableFuture[0]))
|
||||
.orTimeout(10, TimeUnit.MINUTES)
|
||||
.join();
|
||||
} catch (final Exception e) {
|
||||
log.debug("Failed to delete one or more accounts in chunk", e);
|
||||
}
|
||||
|
||||
@@ -112,7 +112,9 @@ public class PushFeedbackProcessor extends AccountDatabaseCrawlerListener {
|
||||
.toList();
|
||||
|
||||
try {
|
||||
CompletableFuture.allOf(updateFutures.toArray(new CompletableFuture[0])).join();
|
||||
CompletableFuture.allOf(updateFutures.toArray(new CompletableFuture[0]))
|
||||
.orTimeout(10, TimeUnit.MINUTES)
|
||||
.join();
|
||||
} catch (final Exception e) {
|
||||
log.debug("Failed to update one or more accounts in chunk", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user