Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. def send(purchase: Purchase): Unit =
  2. system.scheduler.scheduleOnce(100.milliseconds) {
  3. execute(purchase)
  4. }
  5.  
  6. def execute(purchase: Purchase): Unit = {
  7. ... send email ...
  8. ... calculate stuff and write to DB ...
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement