introduce akka.actor.creation-timeout to make Jenkins happy
- I had reused akka.actor.timeout for ActorSystem.actorOf calls (which “ask” the guardian to create the actor), but 5sec proved too short for Jenkins - CreationTimeout defaults to 30sec now, let’s hope Jenkins is not slower than _that_.
This commit is contained in:
parent
66c1d62a51
commit
d6fc97c48d
4 changed files with 20 additions and 16 deletions
|
|
@ -36,6 +36,7 @@ akka {
|
||||||
|
|
||||||
actor {
|
actor {
|
||||||
provider = "akka.actor.LocalActorRefProvider"
|
provider = "akka.actor.LocalActorRefProvider"
|
||||||
|
creation-timeout = 20s # Timeout for ActorSystem.actorOf
|
||||||
timeout = 5s # Default timeout for Future based invocations
|
timeout = 5s # Default timeout for Future based invocations
|
||||||
# - Actor: ask && ?
|
# - Actor: ask && ?
|
||||||
# - UntypedActor: ask
|
# - UntypedActor: ask
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ object ActorSystem {
|
||||||
|
|
||||||
val ProviderClass = getString("akka.actor.provider")
|
val ProviderClass = getString("akka.actor.provider")
|
||||||
|
|
||||||
|
val CreationTimeout = Timeout(Duration(getMilliseconds("akka.actor.creation-timeout"), MILLISECONDS))
|
||||||
val ActorTimeout = Timeout(Duration(getMilliseconds("akka.actor.timeout"), MILLISECONDS))
|
val ActorTimeout = Timeout(Duration(getMilliseconds("akka.actor.timeout"), MILLISECONDS))
|
||||||
val SerializeAllMessages = getBoolean("akka.actor.serialize-messages")
|
val SerializeAllMessages = getBoolean("akka.actor.serialize-messages")
|
||||||
|
|
||||||
|
|
@ -300,19 +301,21 @@ class ActorSystemImpl(val name: String, applicationConfig: Config) extends Actor
|
||||||
|
|
||||||
protected def systemImpl = this
|
protected def systemImpl = this
|
||||||
|
|
||||||
implicit def timeout = settings.ActorTimeout
|
private[akka] def systemActorOf(props: Props, name: String): ActorRef = {
|
||||||
|
implicit val timeout = settings.CreationTimeout
|
||||||
private[akka] def systemActorOf(props: Props, name: String): ActorRef =
|
|
||||||
(systemGuardian ? CreateChild(props, name)).get match {
|
(systemGuardian ? CreateChild(props, name)).get match {
|
||||||
case ref: ActorRef ⇒ ref
|
case ref: ActorRef ⇒ ref
|
||||||
case ex: Exception ⇒ throw ex
|
case ex: Exception ⇒ throw ex
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
def actorOf(props: Props, name: String): ActorRef =
|
def actorOf(props: Props, name: String): ActorRef = {
|
||||||
|
implicit val timeout = settings.CreationTimeout
|
||||||
(guardian ? CreateChild(props, name)).get match {
|
(guardian ? CreateChild(props, name)).get match {
|
||||||
case ref: ActorRef ⇒ ref
|
case ref: ActorRef ⇒ ref
|
||||||
case ex: Exception ⇒ throw ex
|
case ex: Exception ⇒ throw ex
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
import settings._
|
import settings._
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue