MigrateRegistrationRecoveryPasswordsCommand: un-invert semantics of `dryRun` flag

This commit is contained in:
Jonathan Klabunde Tomer 2024-11-22 16:27:30 -08:00 committed by Jon Chambers
parent 717fb57a14
commit 1d9734c824
1 changed files with 6 additions and 6 deletions

View File

@ -87,12 +87,12 @@ public class MigrateRegistrationRecoveryPasswordsCommand extends AbstractCommand
final long expiration = tuple.getT3(); final long expiration = tuple.getT3();
return dryRun return dryRun
? Mono.fromFuture(() -> registrationRecoveryPasswordsManager.migrateE164Record(e164, saltedTokenHash, expiration)) ? Mono.just(false)
.onErrorResume(throwable -> { : Mono.fromFuture(() -> registrationRecoveryPasswordsManager.migrateE164Record(e164, saltedTokenHash, expiration))
logger.warn("Failed to migrate record for {}", e164, throwable); .onErrorResume(throwable -> {
return Mono.empty(); logger.warn("Failed to migrate record for {}", e164, throwable);
}) return Mono.empty();
: Mono.just(false); });
}, maxConcurrency) }, maxConcurrency)
.filter(migrated -> migrated) .filter(migrated -> migrated)
.doOnNext(ignored -> recordsMigratedCounter.increment()) .doOnNext(ignored -> recordsMigratedCounter.increment())