Class

agora.exec.rest.ExecutionWorkflow

Instance

Related Doc: package ExecutionWorkflow

Permalink

class Instance extends ExecutionWorkflow

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

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
ExecutionWorkflow, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Instance
  2. ExecutionWorkflow
  3. AnyRef
  4. 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)

    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
    @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. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

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

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

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

    Permalink
    Attributes
    protected
  16. final def ne(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. 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
  20. def onJob(httpRequest: HttpRequest, workingDir: Path, jobId: JobId, detailsOpt: Option[MatchDetails], runProcess: RunProcess)(implicit ec: ExecutionContext): Future[HttpResponse]

    Permalink
    Attributes
    protected
  21. 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
  22. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit

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

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

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

    Permalink

    the workspaces to use in determining/awaiting working directories

Inherited from ExecutionWorkflow

Inherited from AnyRef

Inherited from Any

Ungrouped