mirror of
https://github.com/signalapp/Signal-Server
synced 2026-10-05 20:07:49 +01:00
Add timeouts to crawl chunk join()s
This commit is contained in:
1 parent
a1e534a515
commit
ecd6b0174a
2 files changed
+6
-2
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
+3
-1
@@ -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