mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 12:06:47 +00:00
Susbcribe on a separate scheduler for non-SPQR account removal
This commit is contained in:
1 parent
82d9107865
commit
771c98fd92
1 file changed
+2
+2
@@ -17,6 +17,7 @@ import org.whispersystems.textsecuregcm.storage.AccountsManager;
|
||||
import org.whispersystems.textsecuregcm.storage.DeviceCapability;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.core.scheduler.Schedulers;
|
||||
import reactor.util.retry.Retry;
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -78,6 +79,7 @@ public class RemoveNonSpqrAccountsCommand extends AbstractSinglePassCrawlAccount
|
||||
final Mono<Void> removeAccountMono = dryRun
|
||||
? Mono.empty()
|
||||
: Mono.fromRunnable(() -> accountsManager.delete(account, AccountsManager.DeletionReason.ADMIN_DELETED))
|
||||
.subscribeOn(Schedulers.boundedElastic())
|
||||
.retryWhen(Retry.backoff(3, Duration.ofSeconds(1)))
|
||||
.onErrorResume(throwable -> {
|
||||
logger.warn("Failed to remove account: {}",
|
||||
|
||||
Reference in new issue
Block a user