Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SingularityBuildInS3WRInput ¶
SingularityBuildInS3WRInput returns wr input that could be piped to `wr add` and that would run a singularity build where the working directory is a fuse mount of the given s3Path.
Types ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner lets you Run() a wr add command.
func (*Runner) Add ¶ added in v1.5.0
Run pipes the given wrInput (eg. as produced by SingularityBuildInS3WRInput()) to `wr add`, which adds a job to wr's queue and returns its ID. You should call Wait(ID) to actually wait for the job to finishing running.
The memory defaults to 8GB, time to 8hrs, and if the cmd in the input has previously been run, the cmd will be re-run.
NB: if the cmd is a duplicate of a currently queued job, this will not generate an error, but just return the id of the existing job.
func (*Runner) Status ¶ added in v1.5.0
func (r *Runner) Status(id string) (WRJobStatus, error)
Status returns the status of the wr job with the given internal ID.
Returns WRJobStatusInvalid if the ID wasn't found. Returns WRJobStatusBuried if it failed. Only returns an error if there was a problem getting the status.
func (*Runner) Wait ¶ added in v1.5.0
func (r *Runner) Wait(id string) (WRJobStatus, error)
Wait waits for the given wr job to exit.
func (*Runner) WaitForRunning ¶ added in v1.5.0
WaitForRunning waits until the given wr job either starts running, or exits.
type WRJobStatus ¶ added in v1.5.0
type WRJobStatus int
const ( WRJobStatusInvalid WRJobStatus = iota WRJobStatusDelayed WRJobStatusReady WRJobStatusReserved WRJobStatusRunning WRJobStatusLost WRJobStatusBuried WRJobStatusComplete )