cronjobs

package
v0.365.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 14 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
}

func New

func New(ctx context.Context, key model.ControllerKey, requestSource string, encryption *encryptionsvc.Service, conn *sql.DB) *Service

func NewForTesting

func NewForTesting(ctx context.Context, key model.ControllerKey, requestSource string, encryption *encryptionsvc.Service, dal dal.DAL, clock clock.Clock) *Service

func (*Service) CreatedOrReplacedDeloyment

func (s *Service) CreatedOrReplacedDeloyment(ctx context.Context) error

CreatedOrReplacedDeloyment is called by the responsible controller to its cron service, we can schedule all cron jobs here since the cron_jobs rows are locked within the transaction and the controllers won't step on each other.

func (*Service) NewCronJobsForModule

func (s *Service) NewCronJobsForModule(ctx context.Context, module *schemapb.Module) ([]model.CronJob, error)

func (*Service) OnJobCompletion added in v0.359.0

func (s *Service) OnJobCompletion(ctx context.Context, key model.CronJobKey, failed bool) (err error)

OnJobCompletion is called by the controller when a cron job async call completes. We schedule the next execution of the cron job here.

Directories

Path Synopsis
dal

Jump to

Keyboard shortcuts

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