cron

package
v0.0.0-...-bbad561 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddJob

func AddJob(job Job)

func ProcessPipelineUpdate

func ProcessPipelineUpdate(j *Job) error

func RemoveJob

func RemoveJob(job *Job)

Types

type Cron

type Cron struct {
	Bot           *bot.Bot
	Cron          *robfigcron.Cron
	Conf          *config.Config
	JobsContainer JobsContainer
}

func InitCron

func InitCron(b *bot.Bot, conf *config.Config) *Cron

func (*Cron) TrackPipelines

func (c *Cron) TrackPipelines(gitlabClient *gl.Client)

type Job

type Job struct {
	Cron        *Cron
	Bot         *bot.Bot
	Gitlab      *gl.Client
	Key         string
	ToID        int64
	Status      string
	Project     string
	Count       int
	PipelineID  int
	LastUpdated time.Time
	LastID      int
}

func (*Job) Exec

func (job *Job) Exec()

Exec ...

func (*Job) Run

func (job *Job) Run()

func (*Job) SendMessage

func (job *Job) SendMessage(ctx context.Context, toID int64, message string) error

type JobsContainer

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

JobsContainer ...

Jump to

Keyboard shortcuts

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