service

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRun = errors.New("no next run")

Functions

This section is empty.

Types

type TaskService

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

func NewTaskService

func NewTaskService(db *gorm.DB, tasks []task.Task) *TaskService

func (*TaskService) GetTask

func (ts *TaskService) GetTask(taskName string) (*task.Task, string)

func (*TaskService) ListTasks

func (ts *TaskService) ListTasks() []task.Task

func (*TaskService) SyncDbTasks

func (ts *TaskService) SyncDbTasks() error

type WorkerService

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

func NewWorkerService

func NewWorkerService(db *gorm.DB, tasks []task.Task) *WorkerService

func (*WorkerService) NextRun

func (ws *WorkerService) NextRun() (db.Run, task.Task, error)

func (*WorkerService) ReportRun

func (ws *WorkerService) ReportRun(req openapi.ReportWorkV1Request) error

func (*WorkerService) ScheduleRun

func (ws *WorkerService) ScheduleRun(
	reason db.RunReason,
	repositoryName string,
	scheduleAfter time.Time,
	taskName string,
	tx *gorm.DB,
) (uint, error)

Jump to

Keyboard shortcuts

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