Skip to content

Instantly share code, notes, and snippets.

@ajaybgupta
Created March 25, 2018 07:18
Show Gist options
  • Save ajaybgupta/ac06b0a85d52b1e94164314b6cc25c05 to your computer and use it in GitHub Desktop.
Save ajaybgupta/ac06b0a85d52b1e94164314b6cc25c05 to your computer and use it in GitHub Desktop.
object Global extends GlobalSettings {
override def onStart(application: play.api.Application) {
import scala.concurrent.duration._
import play.api.Play.current
for (warehouse <- Warehouse.find()) {
val actor = Akka.system.actorOf(
Props(new PickListActor(warehouse))
)
Akka.system.scheduler.schedule(
0.seconds, 30.minutes, actor, "send"
) }
} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment