yrenat commented on code in PR #6046:
URL: https://github.com/apache/texera/pull/6046#discussion_r3868254026


##########
computing-unit-managing-service/src/main/scala/org/apache/texera/service/resource/ComputingUnitManagingResource.scala:
##########
@@ -61,18 +67,213 @@ import org.apache.texera.service.util.{
   KubernetesClient
 }
 import org.jooq.{DSLContext, EnumType}
+import org.jooq.impl.DSL.{boolOr, max}
+import org.slf4j.LoggerFactory
 import play.api.libs.json._
 
 import java.sql.Timestamp
 import scala.annotation.unused
 import scala.jdk.CollectionConverters.CollectionHasAsScala
+import scala.util.control.NonFatal
 
 object ComputingUnitManagingResource {
+  private val logger = 
LoggerFactory.getLogger(classOf[ComputingUnitManagingResource])
+
   private def context: DSLContext =
     SqlServer
       .getInstance()
       .createDSLContext()
 
+  private[resource] final class IdleComputingUnitCleanupConfig(
+      val enabled: Boolean,
+      val idleTimeoutMinutes: Long
+  ) {
+    def copy(
+        enabled: Boolean = this.enabled,
+        idleTimeoutMinutes: Long = this.idleTimeoutMinutes
+    ): IdleComputingUnitCleanupConfig =
+      new IdleComputingUnitCleanupConfig(enabled, idleTimeoutMinutes)
+  }
+
+  private[resource] final class IdleComputingUnitCandidate(
+      val unit: WorkflowComputingUnit,
+      val username: Option[String]
+  )
+
+  private[resource] object WorkflowExecutionStatus extends Enumeration {

Review Comment:
   Added as requested



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to