Documentation ¶
Index ¶
Constants ¶
View Source
const JobDone = "done"
JobDone - the job was processed without issues by the worker
View Source
const JobErrored = "errored"
JobErrored - the job was processed but issues happen so it need a rerun
View Source
const JobInProgress = "in-progress"
JobInProgress - the job was taken by a worker and being worked out
View Source
const JobPending = "pending"
JobPending - the job is in the queue ready to be taken by one of the available worker
View Source
const WorkerAvailable = "available"
WorkerAvailable -
View Source
const WorkerBusy = "busy"
WorkerBusy -
Variables ¶
View Source
var Queues []Queue
Queues - Contain all the stored queues
View Source
var Sessions []User
Sessions - all the sessions
Functions ¶
Types ¶
type Config ¶
type Config struct { Groups []Group Users []User Host string Port int JobTimeout int `yaml:"job_timeout"` WebPort int `yaml:"web_port"` DelayPolicy string `yaml:"delay_policy"` LogLevel string `yaml:"log_level"` TestMode bool `yaml:"test_mode"` AllowDispatch bool `yaml:"allow_dispatch"` }
Config -
var Options Config
Options -
type Job ¶
type Job struct { ID string State string Type string Payload string Attempts int StartedProcessingAt time.Time EndProcessingAt time.Time Queue Queue Group Group }
Job -
type Queue ¶
type Queue struct { ID string Slug string Group Group RecurrentJobs []RecurrentJob Jobs []Job Workers []User }
Queue -
func FindQueueBySlug ¶
FindQueueBySlug - Will find a queue with a slug in a group
If create flag set to true, the queue will be created
func (Queue) UpdateAndKeep ¶
UpdateAndKeep - Will update a queue
type RecurrentJob ¶
RecurrentJob -
func FindRecurrentJob ¶
func FindRecurrentJob(id int) (RecurrentJob, error)
FindRecurrentJob - Find a reccurent job by id
func FindRecurrentJobByType ¶
func FindRecurrentJobByType(queue Queue, jobType string) (RecurrentJob, error)
FindRecurrentJobByType - Find a reccurent job by id
Click to show internal directories.
Click to hide internal directories.