Last active
December 17, 2018 21:23
-
-
Save mchmielarz/56e203ba076ce71312231ba561206da9 to your computer and use it in GitHub Desktop.
Start database and fetch measurements with Try
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Try | |
.run(database::start) | |
.onSuccess(ignore -> log.info("Database started successfully")) | |
.onFailure(exc -> log.error("Cannot start the database", exc)) | |
.andThen( | |
() -> fetchMeasurements(geoCoordinatesReader, airlyService, measurementsRepository) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment