blob: 8342293eb06553a66ce5708dc103a535204c4508 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package io.crashbox.ci
import akka.actor.ActorSystem
import scala.concurrent.duration.Duration
import scala.concurrent.{ Await, ExecutionContext }
trait Core {
implicit val system: ActorSystem = ActorSystem("crashbox")
implicit val executionContext: ExecutionContext = system.dispatcher
val blockingDispatcher: ExecutionContext = system.dispatchers.lookup("crashbox.blocking-dispatcher")
def log = system.log
def config = system.settings.config
sys.addShutdownHook {
log.info("Shutting down systm")
Await.ready(system.terminate(), Duration.Inf)
println("shutdown")
}
}
|