worker

package
v0.0.0-...-6b04d54 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileOpsConcurrency int = 5
	DefaultOutPath         = "/out"
	DefaultModelPath       = "/saved_models"
	DefaultSrcPath         = "/src"

	DefaultWorkSpacePerm = 0755
	DefaultModelPerm     = 0755
	DefaultOutPerm       = 0755

	IgnoreEmptyTask  bool = true
	IgnoreMountError bool = true

	DefaultWorkspaceDir = "workspace"

	CondaSpecName   = "environment.yml"
	DefaultCondaEnv = "python"
	PipReqFileName  = "requirements.txt"
)

Variables

This section is empty.

Functions

func InvalidFlowTaskError

func InvalidFlowTaskError() error

func InvalidFlowTaskStatus

func InvalidFlowTaskStatus(status tsk.TaskStatus) error

Types

type WorkHorse

type WorkHorse struct {
	Id string
	// contains filtered or unexported fields
}

func NewWorkHorse

func NewWorkHorse(client *WorkerClient, serverAddr string, flowId string, taskId string, workerIp string, appDir string, logHandlr *utils.LogHandler) *WorkHorse

func (*WorkHorse) DoWork

func (w *WorkHorse) DoWork() error

func (*WorkHorse) Init

func (w *WorkHorse) Init() error

func (*WorkHorse) InitEnvironment

func (w *WorkHorse) InitEnvironment() error

func (*WorkHorse) MountVolumes

func (w *WorkHorse) MountVolumes() error

func (*WorkHorse) PushTaskStatus

func (w *WorkHorse) PushTaskStatus(status tsk.TaskStatus) error

func (*WorkHorse) PushTaskStatusWithMessage

func (w *WorkHorse) PushTaskStatusWithMessage(status tsk.TaskStatus, msg string) error

func (*WorkHorse) Shutdown

func (w *WorkHorse) Shutdown() error

Jump to

Keyboard shortcuts

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