Created
June 11, 2018 18:35
-
-
Save adamw/9363d6e5436b16f1c40c436de9bd4aec to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def consumeForever(inbox: MVar[BroadcastMessage]): Task[Unit] = | |
consume(connector, inbox).attempt | |
.map { | |
case Left(e) => | |
logger.info("[broadcast] exception in queue consumer, restarting", e) | |
case Right(()) => | |
logger.info("[broadcast] queue consumer completed, restarting") | |
} | |
.restartUntil(_ => false) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment