scheduler

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: GPL-3.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRawConfig

func GetRawConfig(config interface{}) *helper.RawMessage

func NewServicesProvider

func NewServicesProvider(database *db.Database, clientPool *clients.ClientPool, walletManager *wallet.Manager, validatorNames *names.ValidatorNames) types.TaskServices

Types

type TaskScheduler

type TaskScheduler struct {
	// contains filtered or unexported fields
}

func NewTaskScheduler

func NewTaskScheduler(log logrus.FieldLogger, services types.TaskServices, variables types.Variables, testRunID uint64) *TaskScheduler

func (*TaskScheduler) AddCleanupTask

func (ts *TaskScheduler) AddCleanupTask(options *types.TaskOptions) (types.TaskIndex, error)

func (*TaskScheduler) AddRootTask

func (ts *TaskScheduler) AddRootTask(options *types.TaskOptions) (types.TaskIndex, error)

func (*TaskScheduler) CancelTasks added in v0.0.4

func (ts *TaskScheduler) CancelTasks(cancelCleanup bool)

func (*TaskScheduler) ExecuteTask

func (ts *TaskScheduler) ExecuteTask(ctx context.Context, taskIndex types.TaskIndex, taskWatchFn func(ctx context.Context, cancelFn context.CancelFunc, taskIndex types.TaskIndex)) error

ExecuteTask executes a task this function blocks until the task is executed or the context cancelled

func (*TaskScheduler) GetAllCleanupTasks

func (ts *TaskScheduler) GetAllCleanupTasks() []types.TaskIndex

func (*TaskScheduler) GetAllTasks

func (ts *TaskScheduler) GetAllTasks() []types.TaskIndex

func (*TaskScheduler) GetRootCleanupTasks

func (ts *TaskScheduler) GetRootCleanupTasks() []types.TaskIndex

func (*TaskScheduler) GetRootTasks

func (ts *TaskScheduler) GetRootTasks() []types.TaskIndex

func (*TaskScheduler) GetServices

func (ts *TaskScheduler) GetServices() types.TaskServices

func (*TaskScheduler) GetTaskCount

func (ts *TaskScheduler) GetTaskCount() int

func (*TaskScheduler) GetTaskState added in v0.0.10

func (ts *TaskScheduler) GetTaskState(taskIndex types.TaskIndex) types.TaskState

func (*TaskScheduler) ParseTaskOptions

func (ts *TaskScheduler) ParseTaskOptions(rawtask helper.IRawMessage) (*types.TaskOptions, error)

func (*TaskScheduler) RunTasks

func (ts *TaskScheduler) RunTasks(ctx context.Context, timeout time.Duration) error

func (*TaskScheduler) WatchTaskPass

func (ts *TaskScheduler) WatchTaskPass(ctx context.Context, cancelFn context.CancelFunc, taskIndex types.TaskIndex)

Jump to

Keyboard shortcuts

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