job

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Details

type Details struct {
	StorableDetails

	// InputFile is the uploaded tar file name.
	InputFile string `json:"uploadName"`

	// UnpackedFiles is the list of unpacked files uploaded for
	// processing.
	UnpackedFiles []string `json:"files"`

	// OutputFiles is a two-dimensional array of command
	// executions and their output files.
	OutputFiles [][]string `json:"outputFiles"`

	// WorkingDir is the full path to the work directory
	// created for this request.
	WorkingDir string `json:"workingDir"`
}

type Metadata

type Metadata struct {
	dataset.BaseInfo

	Name          string            `json:"name"`
	Summary       string            `json:"summary"`
	Description   string            `json:"description"`
	Token         string            `json:"jobId"`
	Origin        string            `json:"origin"`
	HandlerParams map[string]string `json:"handlerParams"`
}

type Status

type Status string

Status defines a job status value

const (
	StatusReceiving  Status = "uploading files for processing"
	StatusUnpacking  Status = "unpacking uploaded files"
	StatusProcessing Status = "processing uploaded files"
	StatusCompleted  Status = "job completed"
	StatusFailed     Status = "job failed"
	StatusNotStarted Status = "awaiting upload"
)

All possible job status values.

type StatusFile

type StatusFile struct {
	Status  string   `json:"status"`
	Message string   `json:"message"`
	Files   []string `json:"files"`
	Pack    []string `json:"pack"`
}

type StorableDetails

type StorableDetails struct {
	// Started is the timestamp from the start of the HTTP
	// request.
	Started *time.Time `json:"started,omitempty"`

	// Duration is the length of time the request took
	// overall.
	Duration time.Duration `json:"duration"`

	// UserID is the WDK user ID for the user initiating the
	// request.
	UserID uint `json:"userId"`

	// Token is the unique ID given to this request for
	// tracking purposes.
	Token string `json:"token"`

	// Status is the execution status for the current request.
	Status Status `json:"status"`

	// Projects holds the target projects for the request.
	Projects []site.WdkSite `json:"projects"`

	// Size contains the unpackaged size of the dataset
	// payload.
	Size uint `json:"size"`
}

StorableDetails is the subset of process details that will be kept in memory for up to 3 days.

Jump to

Keyboard shortcuts

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