Don't map a `Mono<Void>`
This commit is contained in:
parent
7f6da52349
commit
c8efcf5105
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue