All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.hydrosphere.mist.worker.LocalNode.scala Maven / Gradle / Ivy

package io.hydrosphere.mist.worker

import akka.actor.{Actor, ActorLogging}
import io.hydrosphere.mist.jobs.ServingJobConfiguration
import io.hydrosphere.mist.jobs.runners.Runner

class LocalNode extends Actor with ActorLogging {
  override def receive: Receive = {
    case jobRequest: ServingJobConfiguration =>
      val originalSender = sender
      try {
        val runner = Runner(jobRequest, null)
        val result = runner.run()
        originalSender ! result
        
      } catch {
        case exc: Throwable => originalSender ! Right(exc.toString)
      }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy