tysonnorris commented on a change in pull request #4326: Invoker backpressure
URL: 
https://github.com/apache/incubator-openwhisk/pull/4326#discussion_r298378253
 
 

 ##########
 File path: 
core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala
 ##########
 @@ -53,15 +58,25 @@ case class WorkerData(data: ContainerData, state: 
WorkerState)
  * @param feed actor to request more work from
  * @param prewarmConfig optional settings for container prewarming
  * @param poolConfig config for the ContainerPool
+ * @param resMgr ContainerResourceManager impl
  */
-class ContainerPool(childFactory: ActorRefFactory => ActorRef,
+class ContainerPool(instanceId: InvokerInstanceId,
+                    childFactory: ActorRefFactory => ActorRef,
                     feed: ActorRef,
                     prewarmConfig: List[PrewarmingConfig] = List.empty,
-                    poolConfig: ContainerPoolConfig)
+                    poolConfig: ContainerPoolConfig,
+                    resMgr: Option[ContainerResourceManager])
     extends Actor {
   import ContainerPool.memoryConsumptionOf
 
   implicit val logging = new AkkaLogging(context.system.log)
+  implicit val ec = context.dispatcher
+
+  val resourceManager = resMgr.getOrElse(if 
(poolConfig.clusterManagedResources) {
 
 Review comment:
   yes, it's a mess 😄 This was added after the fact to allow tests to inject a 
ContainerResourceManager. I will change it to a factory(lambda).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to