def listen()

in api/src/main/scala/com/gu/adapters/queue/SqsDeletionConsumer.scala [34:43]


  def listen(): Future[Unit] = {
    SqsSource(props.queueUrl)(client)
      .mapAsync(1)(m => SqsDeletionConsumer.deleteUser(m, avatarStore))
      .runWith(SqsAckSink(props.queueUrl)(client))
      .failed
      .flatMap { e =>
        logger.error("Sqs queue error, restarting consumer in 5 seconds", e)
        pekko.pattern.after(5 seconds, Pekko.scheduler)(listen())
      }
  }