Documentation ¶
Index ¶
- type AsyncJobCompleter
- func (c *AsyncJobCompleter) JobSetCancelled(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time, errData []byte) error
- func (c *AsyncJobCompleter) JobSetCompleted(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time) error
- func (c *AsyncJobCompleter) JobSetDiscarded(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time, errData []byte) error
- func (c *AsyncJobCompleter) JobSetErrored(id int64, stats *jobstats.JobStatistics, scheduledAt time.Time, errData []byte) error
- func (c *AsyncJobCompleter) JobSetSnoozed(id int64, stats *jobstats.JobStatistics, scheduledAt time.Time) error
- func (c *AsyncJobCompleter) Subscribe(subscribeFunc func(update CompleterJobUpdated))
- func (c *AsyncJobCompleter) Wait()
- type CompleterJobUpdated
- type InlineJobCompleter
- func (c *InlineJobCompleter) JobSetCancelled(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time, errData []byte) error
- func (c *InlineJobCompleter) JobSetCompleted(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time) error
- func (c *InlineJobCompleter) JobSetDiscarded(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time, errData []byte) error
- func (c *InlineJobCompleter) JobSetErrored(id int64, stats *jobstats.JobStatistics, scheduledAt time.Time, errData []byte) error
- func (c *InlineJobCompleter) JobSetSnoozed(id int64, stats *jobstats.JobStatistics, scheduledAt time.Time) error
- func (c *InlineJobCompleter) Subscribe(subscribeFunc func(update CompleterJobUpdated))
- func (c *InlineJobCompleter) Wait()
- type JobCompleter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncJobCompleter ¶
type AsyncJobCompleter struct { baseservice.BaseService // contains filtered or unexported fields }
func NewAsyncCompleter ¶
func NewAsyncCompleter(archetype *baseservice.Archetype, adapter dbadapter.Adapter, concurrency uint32) *AsyncJobCompleter
func (*AsyncJobCompleter) JobSetCancelled ¶
func (c *AsyncJobCompleter) JobSetCancelled(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time, errData []byte) error
func (*AsyncJobCompleter) JobSetCompleted ¶
func (c *AsyncJobCompleter) JobSetCompleted(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time) error
func (*AsyncJobCompleter) JobSetDiscarded ¶
func (c *AsyncJobCompleter) JobSetDiscarded(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time, errData []byte) error
func (*AsyncJobCompleter) JobSetErrored ¶
func (c *AsyncJobCompleter) JobSetErrored(id int64, stats *jobstats.JobStatistics, scheduledAt time.Time, errData []byte) error
func (*AsyncJobCompleter) JobSetSnoozed ¶
func (c *AsyncJobCompleter) JobSetSnoozed(id int64, stats *jobstats.JobStatistics, scheduledAt time.Time) error
func (*AsyncJobCompleter) Subscribe ¶
func (c *AsyncJobCompleter) Subscribe(subscribeFunc func(update CompleterJobUpdated))
func (*AsyncJobCompleter) Wait ¶
func (c *AsyncJobCompleter) Wait()
type CompleterJobUpdated ¶
type CompleterJobUpdated struct { Job *dbsqlc.RiverJob JobStats *jobstats.JobStatistics }
type InlineJobCompleter ¶
type InlineJobCompleter struct { baseservice.BaseService // contains filtered or unexported fields }
func NewInlineCompleter ¶
func NewInlineCompleter(archetype *baseservice.Archetype, adapter dbadapter.Adapter) *InlineJobCompleter
func (*InlineJobCompleter) JobSetCancelled ¶
func (c *InlineJobCompleter) JobSetCancelled(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time, errData []byte) error
func (*InlineJobCompleter) JobSetCompleted ¶
func (c *InlineJobCompleter) JobSetCompleted(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time) error
func (*InlineJobCompleter) JobSetDiscarded ¶
func (c *InlineJobCompleter) JobSetDiscarded(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time, errData []byte) error
func (*InlineJobCompleter) JobSetErrored ¶
func (c *InlineJobCompleter) JobSetErrored(id int64, stats *jobstats.JobStatistics, scheduledAt time.Time, errData []byte) error
func (*InlineJobCompleter) JobSetSnoozed ¶
func (c *InlineJobCompleter) JobSetSnoozed(id int64, stats *jobstats.JobStatistics, scheduledAt time.Time) error
func (*InlineJobCompleter) Subscribe ¶
func (c *InlineJobCompleter) Subscribe(subscribeFunc func(update CompleterJobUpdated))
func (*InlineJobCompleter) Wait ¶
func (c *InlineJobCompleter) Wait()
type JobCompleter ¶
type JobCompleter interface { // JobSetCancelled marks a job as cancelled. JobSetCancelled(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time, errData []byte) error // JobSetCompleted marks a job as completed. JobSetCompleted(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time) error // JobSetDiscarded marks a job as discarded. JobSetDiscarded(id int64, stats *jobstats.JobStatistics, finalizedAt time.Time, errData []byte) error // JobSetErrored marks a job as errored (but retryable). JobSetErrored(id int64, stats *jobstats.JobStatistics, scheduledAt time.Time, errData []byte) error // JobSetSnoozed reschedules a job for the future and increments its max attempts. JobSetSnoozed(id int64, stats *jobstats.JobStatistics, scheduledAt time.Time) error // Subscribe injects a callback which will be invoked whenever a job is // updated. Subscribe(subscribeFunc func(update CompleterJobUpdated)) // Wait waits for all ongoing completions to finish, enabling graceful // shutdown. Wait() }
Click to show internal directories.
Click to hide internal directories.