Documentation
¶
Index ¶
- type Storage
- func (s *Storage) CompleteJob(ctx context.Context, id uuid.UUID) error
- func (s *Storage) DeleteColdJobs(ctx context.Context, cutoffDate time.Time, limit uint) (uint, error)
- func (s *Storage) DeleteDeadJobs(ctx context.Context, cutoffDate time.Time, limit uint) (uint, error)
- func (s *Storage) FailJob(ctx context.Context, id uuid.UUID, errorMessage string) error
- func (s *Storage) InsertBatchJobs(ctx context.Context, batcher pqueue.BatchSender, ...) ([]*pqueue.Job, error)
- func (s *Storage) InsertJob(ctx context.Context, queryer pqueue.QueryRower, id uuid.UUID, ...) (*pqueue.Job, error)
- func (s *Storage) ListActiveJobs(ctx context.Context, queues []string, batchSize uint) ([]pqueue.Job, error)
- func (s *Storage) ReScheduleJob(ctx context.Context, id uuid.UUID, scheduledAt time.Time, errorMessage string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is a default Postgres-based implementation of pqueue interface.
func NewStorage ¶
NewStorage creates a new Postgres storage.
func (*Storage) CompleteJob ¶
CompleteJob marks a job in storage as completed.
func (*Storage) DeleteColdJobs ¶
func (s *Storage) DeleteColdJobs(ctx context.Context, cutoffDate time.Time, limit uint) (uint, error)
DeleteColdJobs removes completed jobs.
func (*Storage) DeleteDeadJobs ¶
func (s *Storage) DeleteDeadJobs(ctx context.Context, cutoffDate time.Time, limit uint) (uint, error)
DeleteDeadJobs removes dead jobs.
func (*Storage) InsertBatchJobs ¶
func (s *Storage) InsertBatchJobs( ctx context.Context, batcher pqueue.BatchSender, jobs []pqueue.PreparedBatchJob, ) ([]*pqueue.Job, error)
InsertBatchJobs inserts a batch of jobs into storage.
func (*Storage) InsertJob ¶
func (s *Storage) InsertJob( ctx context.Context, queryer pqueue.QueryRower, id uuid.UUID, idempotencyKey uuid.UUID, queue string, payload []byte, options pqueue.JobOptions, ) (*pqueue.Job, error)
InsertJob inserts a new job into storage.
Click to show internal directories.
Click to hide internal directories.