Repository: incubator-gearpump Updated Branches: refs/heads/master 995c8cc0c -> b79fb2445
[GEARPUMP-348] Allow application total number of retries to be config⦠â¦urable Author: huafengw <[email protected]> Closes #222 from huafengw/restart. Project: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/commit/b79fb244 Tree: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/tree/b79fb244 Diff: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/diff/b79fb244 Branch: refs/heads/master Commit: b79fb2445b88f0e7aab71e72404ca5a449fc97f1 Parents: 995c8cc Author: huafengw <[email protected]> Authored: Sat Sep 2 09:13:25 2017 +0800 Committer: manuzhang <[email protected]> Committed: Sat Sep 2 09:13:26 2017 +0800 ---------------------------------------------------------------------- .../scala/org/apache/gearpump/cluster/master/AppManager.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/b79fb244/core/src/main/scala/org/apache/gearpump/cluster/master/AppManager.scala ---------------------------------------------------------------------- diff --git a/core/src/main/scala/org/apache/gearpump/cluster/master/AppManager.scala b/core/src/main/scala/org/apache/gearpump/cluster/master/AppManager.scala index 450d512..0a42e3a 100644 --- a/core/src/main/scala/org/apache/gearpump/cluster/master/AppManager.scala +++ b/core/src/main/scala/org/apache/gearpump/cluster/master/AppManager.scala @@ -20,7 +20,7 @@ package org.apache.gearpump.cluster.master import akka.actor._ import akka.pattern.ask -import com.typesafe.config.ConfigFactory +import com.typesafe.config.{Config, ConfigFactory} import org.apache.gearpump.Time.MilliSeconds import org.apache.gearpump.cluster.AppMasterToMaster.{AppDataSaved, SaveAppDataFailed, _} import org.apache.gearpump.cluster.AppMasterToWorker._ @@ -47,8 +47,9 @@ private[cluster] class AppManager(kvService: ActorRef, launcher: AppMasterLaunch extends Actor with Stash with TimeOutScheduler { private val LOG: Logger = LogUtil.getLogger(getClass) + private val systemConfig: Config = context.system.settings.config - private val appTotalRetries: Int = 5 + private val appTotalRetries: Int = systemConfig.getInt(Constants.APPLICATION_TOTAL_RETRIES) implicit val timeout = FUTURE_TIMEOUT implicit val executionContext = context.dispatcher
