mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-19 21:18:05 +01:00
Add retry configuration to RemoveExpiredAccountsCommand
This commit is contained in:
@@ -20,6 +20,7 @@ import org.whispersystems.textsecuregcm.storage.Account;
|
||||
import org.whispersystems.textsecuregcm.storage.AccountsManager;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.util.retry.Retry;
|
||||
|
||||
public class RemoveExpiredAccountsCommand extends AbstractSinglePassCrawlAccountsCommand {
|
||||
|
||||
@@ -70,6 +71,7 @@ public class RemoveExpiredAccountsCommand extends AbstractSinglePassCrawlAccount
|
||||
|
||||
return deleteAccountMono
|
||||
.doOnSuccess(ignored -> deletedAccountCounter.increment())
|
||||
.retryWhen(Retry.backoff(8, Duration.ofSeconds(1)).maxBackoff(Duration.ofSeconds(4)))
|
||||
.onErrorResume(throwable -> {
|
||||
log.warn("Failed to delete account {}", expiredAccount.getUuid(), throwable);
|
||||
return Mono.empty();
|
||||
|
||||
Reference in New Issue
Block a user