Class

agora.exec.rest.ExecutionWorkflow

Instance

Related Doc: package ExecutionWorkflow

Permalink

class Instance extends ExecutionWorkflow with FailFastCirceSupport

Executes the 'RunProcess' using the given 'defaultEnv' (default system properties), workspace, and input request.

The workflow is:

1) await any dependencies declared on the RunProcess using the WorkspaceClient 2) upon success of #1, a ProcessLoggers is created for the job in the working directory using the MatchDetails extracted from the HttpRequest headers (if any). Any std out or std err files from the RunProcess are appended to the ProcessLoggers used to run the job. 3) An HttpResponse future is prepared based on the HttpRequest given. That response will either be a FileResult if no streaming settings are provided or a StreamingResult if result streaming was specified by the RunProcess.output.streaming.

Note: if any std out or std err files were specified, then the WorkspaceClient.triggerUploadCheck will be invoked to re-check any files which may depend on the output

returns

the HttpResponse in a future

Linear Supertypes
FailFastCirceSupport, FailFastUnmarshaller, BaseCirceSupport, ExecutionWorkflow, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Instance
  2. FailFastCirceSupport
  3. FailFastUnmarshaller
  4. BaseCirceSupport
  5. ExecutionWorkflow
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Instance(defaultEnv: Map[String, String], workspaces: WorkspaceClient, eventMonitor: SystemEventMonitor, cacheEnabled: Boolean)

    Permalink

    workspaces

    the workspaces to use in determining/awaiting working directories

    eventMonitor

    a monitor to notify of system events

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. val defaultEnv: Map[String, String]

    Permalink
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. val eventMonitor: SystemEventMonitor

    Permalink

    a monitor to notify of system events

  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  12. def invokeJob(jobId: JobId, workingDir: Path, runProcess: RunProcess, processLogger: ProcessLoggers)(implicit ec: ExecutionContext): Future[Int]

    Permalink
    Attributes
    protected
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. implicit final def jsonMarshaller(implicit printer: Printer): ToEntityMarshaller[Json]

    Permalink
    Definition Classes
    BaseCirceSupport
  15. implicit final val jsonUnmarshaller: FromEntityUnmarshaller[Json]

    Permalink
    Definition Classes
    BaseCirceSupport
  16. def loggerForJob(runProcess: RunProcess, detailsOpt: Option[MatchDetails], workingDir: Path): ProcessLoggers

    Permalink
    Attributes
    protected
  17. implicit final def marshaller[A](implicit arg0: Encoder[A], printer: Printer): ToEntityMarshaller[A]

    Permalink
    Definition Classes
    BaseCirceSupport
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  21. def onCancelJob(jobId: JobId, waitFor: FiniteDuration)(implicit ec: ExecutionContext): Future[HttpResponse]

    Permalink

    Cancel the job identified by the job ID

    Cancel the job identified by the job ID

    jobId

    the job to cancel

    waitFor

    if non-zero, then we will await for the given duration for the job to exit before returning

    returns

    an HttpResponse to the cance request

    Definition Classes
    InstanceExecutionWorkflow
  22. def onExecutionRequest(httpRequest: HttpRequest, inputProcess: RunProcess)(implicit ec: ExecutionContext): Future[HttpResponse]

    Permalink

    The job is received.

    The job is received. Do something with it and reply...

    httpRequest

    the originating http request

    inputProcess

    the unmarshalled input process

    returns

    the eventual HttpResponse

    Definition Classes
    InstanceExecutionWorkflow
  23. def onJob(httpRequest: HttpRequest, workingDir: Path, jobId: JobId, detailsOpt: Option[MatchDetails], runProcess: RunProcess)(implicit ec: ExecutionContext): Future[HttpResponse]

    Permalink
    Attributes
    protected
  24. def prepareHttpResponse(jobId: JobId, workingDir: Path, httpRequest: HttpRequest, runProcess: RunProcess, processLogger: ProcessLoggers, exitCodeFuture: Future[Int])(implicit ec: ExecutionContext): Future[HttpResponse]

    Permalink

    Here additional parameters are given to aid in potential subclassing

    Here additional parameters are given to aid in potential subclassing

    jobId

    the unique job id

    workingDir

    the directory the job is running in

    httpRequest

    the input request

    runProcess

    the job unmarshalled from the http request

    processLogger

    the loggers used in the running job

    exitCodeFuture

    the future of the exit code

    returns

    an HttpResposne

    Attributes
    protected
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  27. implicit final def unmarshaller[A](implicit arg0: Decoder[A]): FromEntityUnmarshaller[A]

    Permalink
    Definition Classes
    FailFastUnmarshaller
  28. def unmarshallerContentTypes: Seq[ContentTypeRange]

    Permalink
    Definition Classes
    BaseCirceSupport
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. val workspaces: WorkspaceClient

    Permalink

    the workspaces to use in determining/awaiting working directories

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from FailFastCirceSupport

Inherited from FailFastUnmarshaller

Inherited from BaseCirceSupport

Inherited from ExecutionWorkflow

Inherited from AnyRef

Inherited from Any

Ungrouped