Advertisement
trishLEX

receive in scala

Oct 31st, 2017
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.33 KB | None | 0 0
  1.   def receive = {
  2.  
  3.     case sp: SavePhoto =>
  4.       saveBuffer ! sp.withReplyTo(context.actorSelection(sender().path) :: sp.replyTo)
  5.  
  6.     case rp: RemovePhotos if !rp.filter.isEmpty =>
  7.       RemovePhotosStream(rp)
  8.         .runWith(Sink.ignore)
  9.         .failed
  10.         .foreach(e => log.error(e, "failed to remove photos"))
  11.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement