joblib

package
v0.1.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2021 License: CC0-1.0, CC0-1.0, CC0-1.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetTask

func SetTask(t Task)

SetTask sets the task data for the Lua job module. Note that the task data must be set BEFORE the module is first loaded into the Lua runtime by the user; attempting to set the task data after the module is loaded will have no affect.

Types

type Manifest

type Manifest interface {
	// Files returns the files in the manifest.
	Files() []string
	// Directories returns the directories in the manifest.
	Directories() []string
	// ContainsFile returns true if and only if the manifest contains a file with the given path.
	ContainsFile(string) bool
}

Manifest records the files and directories associated with a task

func ManifestArg

func ManifestArg(c *rt.GoCont, n int) (Manifest, error)

ManifestArg turns a continuation argument into a Manifest.

func ValueToManifest

func ValueToManifest(v rt.Value) (Manifest, bool)

ValueToManifest turns a lua value to a Manifest, if possible.

type Task

type Task interface {
	// Name is the name of the job to which this task belongs.
	Name() string
	// JobID is the ID of the job.
	JobID() ulid.ULID
	// Manifest records the files and directories uploaded with the job.
	Manifest() Manifest
	// Script is the file in Manifest that is run for each task in the job.
	Script() string
	// WorkingDir is a directory in Manifest, either explicitly or implicitly (as a subpath).
	WorkingDir() string
	// Metadata records user-provided metadata.
	Metadata() map[string]string
	// Priority is the priority level of the job.
	Priority() uint8
	// ID is the ID of the task.
	ID() ulid.ULID
	// Value is the value of the task.
	Value() int64
	// Deadline is the time at which the task will go stale.
	Deadline() time.Time
	// Failures is the number of times that this task has failed.
	Failures() int
}

Task represents a task in a job scheduling system

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL