job_creation

package
v0.0.0-...-65468f9 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobCreator

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

JobCreator is a struct used for creating Jobs based on new commits, tryjobs, and timed triggers.

func NewJobCreator

func NewJobCreator(ctx context.Context, d db.DB, period time.Duration, numCommits int, workdir, host string, repos repograph.Map, rbe cas.CAS, c *http.Client, buildbucketProject, buildbucketTarget, buildbucketBucket string, projectRepoMapping map[string]string, depotTools string, gerrit gerrit.GerritInterface, taskCfgCache task_cfg_cache.TaskCfgCache, pubsubClient pubsub.Client, numSyncWorkers int) (*JobCreator, error)

NewJobCreator returns a JobCreator instance.

func (*JobCreator) Close

func (jc *JobCreator) Close() error

Close cleans up resources used by the JobCreator.

func (*JobCreator) HandleRepoUpdate

func (jc *JobCreator) HandleRepoUpdate(ctx context.Context, repoUrl string, g *repograph.Graph, ack, nack func()) error

HandleRepoUpdate is a pubsub.AutoUpdateMapCallback which is called when any of the repos is updated.

func (*JobCreator) MaybeTriggerPeriodicJobs

func (jc *JobCreator) MaybeTriggerPeriodicJobs(ctx context.Context, triggerName string) error

MaybeTriggerPeriodicJobs triggers all periodic jobs with the given trigger name, if those jobs haven't already been triggered.

func (*JobCreator) Start

func (jc *JobCreator) Start(ctx context.Context, enableTryjobs bool)

Start initeates the JobCreator's goroutines for creating jobs.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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