<commit_before>package io.vamp.core.container_driver

import io.vamp.common.akka._
import akka.actor.Props
import akka.util.Timeout
import com.typesafe.config.ConfigFactory
import io.vamp.common.vitals.InfoRequest
import io.vamp.core.container_driver.notification.{ContainerDriverNotificationProvider, ContainerResponseError, UnsupportedContainerDriverRequest}
import io.vamp.core.model.artifact.{Deployment, DeploymentCluster, DeploymentService}

import scala.concurrent.duration._

object ContainerDriverActor extends ActorDescription {

  lazy val timeout = Timeout(ConfigFactory.load().getInt("vamp.core.container-driver.response-timeout").seconds)

  def props(args: Any*): Props = Props(classOf[ContainerDriverActor], args: _*)

  trait ContainerDriveMessage

  object All extends ContainerDriveMessage

  case class Deploy(deployment: Deployment, cluster: DeploymentCluster, service: DeploymentService, update: Boolean) extends ContainerDriveMessage

  case class Undeploy(deployment: Deployment, service: DeploymentService) extends ContainerDriveMessage

}

class ContainerDriverActor(driver: ContainerDriver) extends CommonReplyActor with ContainerDriverNotificationProvider {

  import io.vamp.core.container_driver.ContainerDriverActor._

  implicit val timeout = ContainerDriverActor.timeout

  override protected def requestType: Class[_] = classOf[ContainerDriveMessage]

  override protected def errorRequest(request: Any): RequestError = UnsupportedContainerDriverRequest(request)

  def reply(request: Any) = try {
    request match {
      case InfoRequest => offload(driver.info, classOf[ContainerResponseError])
      case All => offload(driver.all, classOf[ContainerResponseError])
      case Deploy(deployment, cluster, service, update) => offload(driver.deploy(deployment, cluster, service, update), classOf[ContainerResponseError])
      case Undeploy(deployment, service) => offload(driver.undeploy(deployment, service), classOf[ContainerResponseError])
      case _ => unsupported(request)
    }
  } catch {
    case e: Throwable => reportException(ContainerResponseError(e))
  }
}

<commit_msg>removing offload<commit_after>package io.vamp.core.container_driver

import akka.actor.Props
import akka.util.Timeout
import com.typesafe.config.ConfigFactory
import io.vamp.common.akka._
import io.vamp.common.vitals.InfoRequest
import io.vamp.core.container_driver.notification.{ContainerDriverNotificationProvider, ContainerResponseError, UnsupportedContainerDriverRequest}
import io.vamp.core.model.artifact.{Deployment, DeploymentCluster, DeploymentService}

import scala.concurrent.duration._

object ContainerDriverActor extends ActorDescription {

  lazy val timeout = Timeout(ConfigFactory.load().getInt("vamp.core.container-driver.response-timeout").seconds)

  def props(args: Any*): Props = Props(classOf[ContainerDriverActor], args: _*)

  trait ContainerDriveMessage

  object All extends ContainerDriveMessage

  case class Deploy(deployment: Deployment, cluster: DeploymentCluster, service: DeploymentService, update: Boolean) extends ContainerDriveMessage

  case class Undeploy(deployment: Deployment, service: DeploymentService) extends ContainerDriveMessage

}

class ContainerDriverActor(driver: ContainerDriver) extends CommonSupportForActors with ContainerDriverNotificationProvider {

  import io.vamp.core.container_driver.ContainerDriverActor._

  implicit val timeout = ContainerDriverActor.timeout

  override def errorNotificationClass = classOf[ContainerResponseError]

  def receive = {
    case InfoRequest => reply {
      driver.info
    }
    case All => reply {
      driver.all
    }
    case Deploy(deployment, cluster, service, update) => reply {
      driver.deploy(deployment, cluster, service, update)
    }
    case Undeploy(deployment, service) => reply {
      driver.undeploy(deployment, service)
    }
    case any => unsupported(UnsupportedContainerDriverRequest(any))
  }
}


{'fraction_non_alphanumeric': 0.08367139959432049, 'fraction_numerical': 0.0, 'mean_word_length': 5.982300884955753, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3141940', 'n_tokens_mistral': 1061, 'n_tokens_neox': 1024, 'n_words': 234}