Documentation
¶
Overview ¶
Package queue provides CLI integration for the pg-boss queue/jobs plugin.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PurgeQueue ¶
PurgeQueue removes completed/dead jobs older than the specified duration. The DELETE runs inside a transaction that first takes a transaction-scoped advisory lock so concurrent purges cannot fight over the same rows.
Types ¶
type CronEntry ¶
type CronEntry struct {
Name string `json:"name"`
Queue string `json:"queue"`
Schedule string `json:"schedule"`
Enabled bool `json:"enabled"`
}
CronEntry represents a scheduled cron job.
type Job ¶
type Job struct {
ID string `json:"id"`
Queue string `json:"queue"`
State string `json:"state"` // pending, active, completed, failed, dead
Data json.RawMessage `json:"data"`
CreatedAt time.Time `json:"created_at"`
StartedAt *time.Time `json:"started_at,omitempty"`
DoneAt *time.Time `json:"done_at,omitempty"`
RetryCount int `json:"retry_count"`
Error string `json:"error,omitempty"`
}
Job represents a queue job.
Click to show internal directories.
Click to hide internal directories.