integration

package
v0.0.0-...-73c3907 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Que = &mock.QueueMock{
	AddFunc: func(job worker.QueJobInterface) error {
		jobInfo, err := job.GetJobInfo()

		if err != nil {
			return err
		}
		if scheduler, ok := jobInfo.Argument.(worker.Scheduler); ok && scheduler.GetScheduleTime() != nil {
			job.SetStatus(worker.JobStatusScheduled)
		}
		items = append(items, job)
		return nil
	},
	KillFunc: func(job worker.QueJobInterface) error {
		return job.SetStatus(worker.JobStatusKilled)
	},
	ListenFunc: func(jobDefs []*worker.QorJobDefinition, getJob func(qorJobID uint) (worker.QueJobInterface, error)) error {
		return nil
	},
	RemoveFunc: func(job worker.QueJobInterface) error {
		return job.SetStatus(worker.JobStatusCancelled)
	},
}

Functions

func ConsumeQueItem

func ConsumeQueItem() (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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