Add timeouts to crawl chunk `join()`s
This commit is contained in:
parent
a1e534a515
commit
ecd6b0174a
|
@ -61,7 +61,9 @@ public class AccountCleaner extends AccountDatabaseCrawlerListener {
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
try {
|
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) {
|
} catch (final Exception e) {
|
||||||
log.debug("Failed to delete one or more accounts in chunk", e);
|
log.debug("Failed to delete one or more accounts in chunk", e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,9 @@ public class PushFeedbackProcessor extends AccountDatabaseCrawlerListener {
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
try {
|
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) {
|
} catch (final Exception e) {
|
||||||
log.debug("Failed to update one or more accounts in chunk", e);
|
log.debug("Failed to update one or more accounts in chunk", e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue