xormqueue

package module
v0.0.0-...-ccc4b8e Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 6 Imported by: 0

README

work-xormqueue

An implementation of the Queue interface from github.com/taylorchu/work for xorm

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewXormQueue

func NewXormQueue(engine *xorm.Engine) (work.Queue, error)

Types

type Job

type Job struct {
	ID        int64     `xorm:"'id' pk autoincr"`
	JobKey    string    `xorm:"'job_key' unique not null index"`
	JobID     string    `xorm:"'job_id' not null index"`
	Namespace string    `xorm:"'namespace' not null index"`
	QueueID   string    `xorm:"'queue_id' not null index"`
	Data      []byte    `xorm:"'data' blob"`
	CreatedAt time.Time `xorm:"'created_at' created"`
	UpdatedAt time.Time `xorm:"'updated_at' updated"`
}

Job represents a job record in the database

type Lease

type Lease struct {
	ID        int64     `xorm:"'id' pk autoincr"`
	LeaseKey  string    `xorm:"'lease_key' unique not null index"`
	JobID     string    `xorm:"'job_id' not null index"`
	Namespace string    `xorm:"'namespace' not null index"`
	QueueID   string    `xorm:"'queue_id' not null index"`
	ExpiresAt time.Time `xorm:"'expires_at' not null index"`
	CreatedAt time.Time `xorm:"'created_at' created"`
}

Lease represents a job lease record in the database

Jump to

Keyboard shortcuts

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