Doesn't schedule take a FiniteDuration?

11 maj 2013 kl. 19:57 skrev "Viktor Klang (√)" <notifications@github.com>:

In
akka-cluster/src/main/scala/akka/cluster/routing/ClusterRouterConfig.scala:

> @@ -308,6 +335,14 @@ private[akka] class ClusterRouterActor extends Router {
>        routeeProvider.nodes = s.members.collect { case m if routeeProvider.isAvailable(m) ⇒ m.address }
>        routeeProvider.createRoutees()
>
> +      if (routeeProvider.settings.isRouteesPathDefined && retryTask.isEmpty)
> +        routeeProvider.settings.retryLookupInterval match {
> +          case interval: FiniteDuration ⇒

I'd probably prefer a simple if:

val interval = routeeProvider.settings.retryLookupInterval
if (interval.isFinite) // Retries enabled
   retryTask = Some(context.system.scheduler.schedule(interval,
interval, self, RetryTick)(context.dispatcher))

—
Reply to this email directly or view it on
GitHub<https://github.com/akka/akka/pull/1429/files#r4183728>
.