Module Job

module Job: sig .. end
Build jobs.

Jobs are for a given switch version and host configurations. Jobs have pre-requisites: these are objects which needs to be built and be put into the worker context before the job could start.

Completed jobs produce output object(s) which will be consummed by other jobs.


type id = [ `Job ] Id.t 
The type for job identifiers. Job identifiers are deterministic, i.e. similar jobs will have the same identifiers. As for tasks, the identifier is built by calling Id.digest on the concatenation of Job.create arguments (after normalisation).
type t 
The type for job values.
val create : ?inputs:id list ->
Host.t -> Switch.t -> (Package.t * Package.info) list -> t
create h c pkgs is the job of building the list of packages pkgs using the OCaml compiler switch c on a worker having h as host configuration.

The job will be able to access the outputs objects created by the (optional) inputs jobs.

val id : t -> id
id t id t's deterministic identifier. It is obtained by hasing a stable representation of t's components.
val switch : t -> Switch.t
switch t is t's switch.
val host : t -> Host.t
host t is t's host.
val inputs : t -> id list
input t are t's job inputs.
val packages : t -> (Package.t * Package.info) list
packages t are the packages that t has to build.
val equal : t -> t -> bool
equal is the job equality.
val compare : t -> t -> int
compare compares jobs.
val json : t Jsont.codec
json is the JSON codec for jobs.
val pp : t Fmt.t
pp formats jobs.


type status = [ `Cancelled | `Failure | `Pending | `Runnable | `Running | `Success ] 
The type for job status.
val json_status : status Jsont.codec
json_status is the JSON codec for job status.
val pp_status : status Fmt.t
pp_status formats jobs Job.status.
val task_status : status list -> Task.status
task_status s is the status summary of s. If all status are `Success then it is a `Success. If all status are `Failed then it is also `Failed. Otherwise it is `Pending.