From e93395e334e64fcf185edf3e15c0d974b36e5cd1 Mon Sep 17 00:00:00 2001 From: Jon Chambers <63609320+jon-signal@users.noreply.github.com> Date: Thu, 3 Sep 2026 12:12:05 -0400 Subject: [PATCH] Retire `PopulateAccountRecoveryPasswordsCommand` --- .../textsecuregcm/WhisperServerService.java | 3 - ...pulateAccountRecoveryPasswordsCommand.java | 81 ------------------- 2 files changed, 84 deletions(-) delete mode 100644 service/src/main/java/org/whispersystems/textsecuregcm/workers/PopulateAccountRecoveryPasswordsCommand.java diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java b/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java index 6d75dd06a..2ba26aec5 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java @@ -333,7 +333,6 @@ import org.whispersystems.textsecuregcm.workers.DeleteUserCommand; import org.whispersystems.textsecuregcm.workers.IdleDeviceNotificationSchedulerFactory; import org.whispersystems.textsecuregcm.workers.MessagePersisterServiceCommand; import org.whispersystems.textsecuregcm.workers.NotifyIdleDevicesCommand; -import org.whispersystems.textsecuregcm.workers.PopulateAccountRecoveryPasswordsCommand; import org.whispersystems.textsecuregcm.workers.ProcessScheduledJobsServiceCommand; import org.whispersystems.textsecuregcm.workers.RegenerateSecondaryDynamoDbTableDataCommand; import org.whispersystems.textsecuregcm.workers.RemoveExpiredAccountsCommand; @@ -415,8 +414,6 @@ public class WhisperServerService extends Application accounts) { - final AccountsManager accountsManager = getCommandDependencies().accountsManager(); - - final boolean dryRun = getNamespace().getBoolean(DRY_RUN_ARGUMENT); - final int maxConcurrency = getNamespace().getInt(MAX_CONCURRENCY_ARGUMENT); - - final Counter accountsMigratedCounter = - Metrics.counter(ACCOUNTS_MIGRATED_COUNTER_NAME, "dryRun", String.valueOf(dryRun)); - - accounts.flatMap(account -> (dryRun - ? Mono.empty() - : Mono.fromRunnable(() -> accountsManager.migrateAccountRecoveryPassword(account))) - .onErrorResume(throwable -> { - logger.warn("Failed to migrate account recovery password for account {}", - account.getAccountIdentifier(), throwable); - - return Mono.empty(); - }) - .subscribeOn(Schedulers.boundedElastic()) - .doOnSuccess(_ -> accountsMigratedCounter.increment()), maxConcurrency) - .then() - .block(); - } -}