akka/akka-core

Akka Typed / Persistence : add .recover to Effect.persist for faster failure notification

Open

#27.426 aperta il 26 lug 2019

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)Scala (3547 fork)batch import
1 - triagedhelp wantedt:typed

Metriche repository

Star
 (13.277 star)
Metriche merge PR
 (Merge medio 8g 19h) (10 PR mergiate in 30 g)

Descrizione

I'd like to be able to notify the replyTo in the case of failure a quickly as possible from Effect.persist. So .recover would be nice. Maybe something like the following:

Effect.persist(ArtifactRead())
  .thenRun(_ => replyTo ! Okay())
  .recover { 
     case ex: Exception => 
         replyTo ! Failure(ex.getMessage)
  }

Guida contributor