Documentation ¶
Index ¶
- type FailedJob
- type FailedJobDAO
- type Failer
- type Job
- type JobDAO
- type Queue
- func (q *Queue) Ack(job queue.Job)
- func (q *Queue) Count() int64
- func (q *Queue) Dequeue() (queue.Job, bool)
- func (q *Queue) Enqueue(job queue.Job) bool
- func (q *Queue) Fail(job queue.Job, err error)
- func (q *Queue) Flush()
- func (q *Queue) IsEmpty() bool
- func (q *Queue) Name() string
- func (q *Queue) Progress() (pending int64, executing int64)
- func (q *Queue) Reload()
- func (q *Queue) Remove(job queue.Job) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FailedJob ¶
type FailedJob struct { ID uint64 `gorm:"column:id;autoIncrement;primaryKey;not null"` Queue string `gorm:"column:queue;not null"` Payload queue.Queueable `gorm:"column:payload;serializer:json;not null"` Exception exception.Throwable `gorm:"column:exception"` FailedAt time.Time `gorm:"column:failed_at;not null;autoCreateTime"` }
FailedJob failed job model
type FailedJobDAO ¶
type FailedJobDAO struct { dao.DAO[FailedJob] ID field.Uint64 Queue field.String Payload field.String Exception field.String FailedAt field.Time }
FailedJobDAO failed job dao
type Job ¶
type Job struct { dao.DAO[Job] `gorm:"-"` JobID uint64 `gorm:"column:id;autoIncrement;primaryKey;not null"` JobUUID uuid.UUID `gorm:"column:uuid;uniqueIndex;not null"` Queue string `gorm:"column:queue;not null"` JobPayload queue.Job `gorm:"column:payload;serializer:json;not null"` JobAttempts uint8 `gorm:"column:attempts;default:0"` ReservedAt *time.Time `gorm:"column:reserved_at"` AvaliableAt *time.Time `gorm:"column:avaliable_at;not null"` CreatedAt *time.Time `gorm:"column:created_at;not null;autoCreateTime"` }
Job job model
type JobDAO ¶
type JobDAO struct { dao.DAO[Job] ID field.Uint64 UUID field.String Queue field.String Payload field.String Attempts field.Uint8 ReservedAt field.Time AvaliableAt field.Time CreatedAt field.Time }
JobDAO job dao
Click to show internal directories.
Click to hide internal directories.