akka/akka-core

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

Open

#27.426 geöffnet am 26. Juli 2019

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Scala (3.547 Forks)batch import
1 - triagedhelp wantedt:typed

Repository-Metriken

Stars
 (13.277 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T 19h) (10 gemergte PRs in 30 T)

Beschreibung

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)
  }

Contributor Guide