Don't map a `Mono<Void>`

This commit is contained in:
Ravi Khadiwala 2024-04-24 12:31:58 -05:00 committed by ravi-signal
parent 7f6da52349
commit c8efcf5105
1 changed files with 1 additions and 3 deletions

View File

@ -14,8 +14,6 @@ import java.time.Clock;
import java.time.Duration; import java.time.Duration;
import java.util.HexFormat; import java.util.HexFormat;
import java.util.Objects; import java.util.Objects;
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors;
import net.sourceforge.argparse4j.inf.Namespace; import net.sourceforge.argparse4j.inf.Namespace;
import net.sourceforge.argparse4j.inf.Subparser; import net.sourceforge.argparse4j.inf.Subparser;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -143,7 +141,7 @@ public class RemoveExpiredBackupsCommand extends EnvironmentCommand<WhisperServe
if (dryRun) { if (dryRun) {
mono = Mono.just(true); mono = Mono.just(true);
} else { } else {
mono = Mono.fromCompletionStage(() -> backupManager.expireBackup(expiredBackup)).map(ignore -> true); mono = Mono.fromCompletionStage(() -> backupManager.expireBackup(expiredBackup)).thenReturn(true);
} }
return mono return mono