Skip to content

Commit

Permalink
no concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
Qi77Qi committed Jan 6, 2021
1 parent efc7510 commit c79fb91
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CryptominingSubscriber(subscriber: GoogleSubscriber[IO, CryptominingUserMe
userService: UserService
)(implicit logger: StructuredLogger[IO], cs: ContextShift[IO]) {
val process: Stream[IO, Unit] = subscriber.messages
.parEvalMapUnordered(2)(messageHandler) // concurrency is low since we don't need high performance in disabling cryptomining users.
.evalMap(messageHandler)
.handleErrorWith(error => Stream.eval(logger.error(error)("Failed to initialize message processor")))

private def messageHandler(event: Event[CryptominingUserMessage]): IO[Unit] = {
Expand Down

0 comments on commit c79fb91

Please sign in to comment.