scheduler

package
Version: v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InitializeThreshold = 5 * time.Minute
	PullInterval        = 3 * time.Second
)
View Source
const (
	// Success Result
	Success string = "success"
	// Failure Result
	Failure string = "failure"
	// maxProbeRetries
	MaxProbeRetries = 3
)
View Source
const (
	// CleanJobScheduler ...
	CleanJobScheduler = "CleanJobScheduler"
	// UpsertWorkflowScheduler ...
	UpsertWorkflowScheduler = "UpsertWorkflowScheduler"
	// UpsertTestScheduler ...
	UpsertTestScheduler = "UpsertTestScheduler"
	// UpsertColliePipelineScheduler ...
	UpsertColliePipelineScheduler = "UpsertColliePipelineScheduler"
	//CleanProductScheduler ...
	CleanProductScheduler = "CleanProductScheduler"
	//InitBuildStatScheduler
	InitStatScheduler = "InitStatScheduler"
	//InitOperationStatScheduler
	InitOperationStatScheduler = "InitOperationStatScheduler"

	//InitPullSonarStatScheduler
	InitPullSonarStatScheduler = "InitPullSonarStatScheduler"

	// SystemCapacityGC periodically triggers  garbage collection for system data based on its retention policy.
	SystemCapacityGC = "SystemCapacityGC"
	//InitHealthCheckScheduler
	InitHealthCheckScheduler = "InitHealthCheckScheduler"
)

Variables

This section is empty.

Functions

func BuildScheduledEnvJob added in v1.2.0

func BuildScheduledEnvJob(scheduler *gocron.Scheduler, healthCheck *service.PmHealthCheck) *gocron.Job

BuildScheduledEnvJob ...

func BuildScheduledJob

func BuildScheduledJob(scheduler *gocron.Scheduler, schedule *service.Schedule) *gocron.Job

BuildScheduledJob ...

func BuildScheduledPipelineJob

func BuildScheduledPipelineJob(scheduler *gocron.Scheduler, schedule *service.Schedule) *gocron.Job

BuildScheduledPipelineJob ...

func InitExistedCronjob

func InitExistedCronjob(client *client.Client, scheduler *cronlib.CronSchduler)

Types

type CronClient

type CronClient struct {
	AslanCli            *client.Client
	CollieCli           *client.CollieClient
	Schedulers          map[string]*gocron.Scheduler
	SchedulerController map[string]chan bool
	// contains filtered or unexported fields
}

CronClient ...

func NewCronClient

func NewCronClient() *CronClient

NewCronClient ... 服务初始化

func (*CronClient) Init

func (c *CronClient) Init()

初始化轮询任务

func (*CronClient) InitBuildStatScheduler

func (c *CronClient) InitBuildStatScheduler()

InitBuildStatScheduler ...

func (*CronClient) InitCleanJobScheduler

func (c *CronClient) InitCleanJobScheduler()

InitCleanJobScheduler ...

func (*CronClient) InitCleanProductScheduler added in v1.2.0

func (c *CronClient) InitCleanProductScheduler()

InitCleanProductScheduler ...

func (*CronClient) InitColliePipelineScheduler

func (c *CronClient) InitColliePipelineScheduler()

InitJobScheduler ...

func (*CronClient) InitHealthCheckScheduler added in v1.2.0

func (c *CronClient) InitHealthCheckScheduler()

func (*CronClient) InitJobScheduler

func (c *CronClient) InitJobScheduler()

InitJobScheduler ...

func (*CronClient) InitOperationStatScheduler

func (c *CronClient) InitOperationStatScheduler()

InitOperationStatScheduler ...

func (*CronClient) InitPullSonarStatScheduler

func (c *CronClient) InitPullSonarStatScheduler()

InitPullSonarStatScheduler ...

func (*CronClient) InitSystemCapacityGCScheduler

func (c *CronClient) InitSystemCapacityGCScheduler()

func (*CronClient) InitTestScheduler

func (c *CronClient) InitTestScheduler()

InitTestScheduler ...

func (*CronClient) RunColliePipelineScheduledTask

func (c *CronClient) RunColliePipelineScheduledTask(pipeline *service.PipelineResource, log *zap.SugaredLogger)

RunTestScheduledTask ...

func (*CronClient) RunScheduledPipelineTask

func (c *CronClient) RunScheduledPipelineTask(pipeline *service.Pipeline, params *service.TaskArgs, log *zap.SugaredLogger)

func (*CronClient) RunScheduledService added in v1.2.0

func (c *CronClient) RunScheduledService(svc *service.Service, healthCheck *service.PmHealthCheck, address, envName, hostID string, log *zap.SugaredLogger)

func (*CronClient) RunScheduledTask

func (c *CronClient) RunScheduledTask(workflow *service.Workflow, params *service.WorkflowTaskArgs, log *zap.SugaredLogger)

RunScheduledTask ...

func (*CronClient) RunTestScheduledTask

func (c *CronClient) RunTestScheduledTask(test *service.TestingOpt, log *zap.SugaredLogger)

RunTestScheduledTask ...

func (*CronClient) StopTestScheduler

func (c *CronClient) StopTestScheduler(key string, log *zap.SugaredLogger)

func (*CronClient) UpsertColliePipelineScheduler

func (c *CronClient) UpsertColliePipelineScheduler(log *zap.SugaredLogger)

UpsertColliePipelineScheduler ...

func (*CronClient) UpsertEnvServiceScheduler added in v1.2.0

func (c *CronClient) UpsertEnvServiceScheduler(log *zap.SugaredLogger)

UpsertEnvServiceScheduler ...

func (*CronClient) UpsertTestScheduler

func (c *CronClient) UpsertTestScheduler(log *zap.SugaredLogger)

UpsertTestScheduler ...

func (*CronClient) UpsertWorkflowScheduler

func (c *CronClient) UpsertWorkflowScheduler(log *zap.SugaredLogger)

type CronjobHandler

type CronjobHandler struct {
	Scheduler *cronlib.CronSchduler
	// contains filtered or unexported fields
}

func NewCronjobHandler

func NewCronjobHandler(client *client.Client, scheduler *cronlib.CronSchduler) *CronjobHandler

func (*CronjobHandler) HandleMessage

func (h *CronjobHandler) HandleMessage(message *nsq.Message) error

HandleMessage ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL