Created
November 29, 2021 13:09
-
-
Save madper/3479bdde6c7afaf5474d97260dd27a1b to your computer and use it in GitHub Desktop.
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
def run(args: List[String]): URIO[Random with Console with Console,ExitCode] = { | |
HttpClientZioBackend().flatMap { backend => | |
for { | |
r <- random.nextIntBetween(0, urist.length - 1).flatMap( i => quickRequest.get(urist(i)).send(backend)).catchAll(e => putStrLn(e.getMessage())).forever.fork | |
_ <- r.join | |
_ <- backend.close() | |
} yield () | |
}.exitCode | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment