jobs

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service manages jobs

func New

func New(db *database.Database, fs filesystem.FS) *Service

New creates a jobs service

func (*Service) CreateAutopkgtestJob added in v0.10.1

func (service *Service) CreateAutopkgtestJob(uploadID uint, debJobArtifactID uint) (*models.Job, error)

CreateAutopkgtestJob creates an autopkgtest job for the provided .deb artifact id

func (*Service) CreateBuildJob

func (service *Service) CreateBuildJob(uploadID uint) (*models.Job, error)

CreateBuildJob creates a build job

func (*Service) GetAllJobArtifactsByJobID

func (service *Service) GetAllJobArtifactsByJobID(jobID uint) ([]*models.JobArtifact, error)

GetAllJobArtifactsByJobID returns a list of all artifacts for a job

func (*Service) GetAllJobs

func (service *Service) GetAllJobs() ([]*models.Job, error)

GetAllJobs returns all jobs

func (*Service) GetAllJobsByUploadID

func (service *Service) GetAllJobsByUploadID(uploadID uint) ([]*models.Job, error)

GetAllJobsByUploadID returns all jobs for a given upload

func (*Service) GetJob

func (service *Service) GetJob(id uint) (*models.Job, error)

GetJob returns the job with the given id

func (*Service) GetJobArtifact

func (service *Service) GetJobArtifact(jobID uint, filename string) (io.ReadCloser, error)

GetJobArtifact returns a job artifact

func (*Service) GetJobLog

func (service *Service) GetJobLog(jobID uint) (io.ReadCloser, error)

GetJobLog returns the log of a job

func (*Service) SaveJobArtifact

func (service *Service) SaveJobArtifact(jobID uint, filename string, content io.Reader) error

SaveJobArtifact will save a job artifact

func (*Service) SaveJobLog

func (service *Service) SaveJobLog(jobID uint, content io.Reader) error

SaveJobLog will save logs for a job

func (*Service) SetJobStatus

func (service *Service) SetJobStatus(jobID uint, status models.JobStatus) error

SetJobStatus will change the status of a job

func (*Service) UnqueueNextJob

func (service *Service) UnqueueNextJob() (*models.Job, error)

UnqueueNextJob returns the next job and marks it as assigned

Jump to

Keyboard shortcuts

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