Documentation
¶
Index ¶
- type CancelJobParams
- type CompleteJobLockedParams
- type CompleteJobParams
- type DBTX
- type DeleteDeadJobParams
- type DeleteJobParams
- type InsertJobParams
- type Job
- type JobStatusCountsRow
- type ListJobsByStatusParams
- type ListJobsByStatusTypeParams
- type ListJobsByTypeParams
- type ListJobsParams
- type MarkJobDeadLockedParams
- type MarkJobDeadParams
- type MarkJobFailedLockedParams
- type MarkJobFailedParams
- type PurgeJobsByStatusParams
- type Queries
- func (q *Queries) CancelJob(ctx context.Context, arg CancelJobParams) (int64, error)
- func (q *Queries) CompleteJob(ctx context.Context, arg CompleteJobParams) error
- func (q *Queries) CompleteJobLocked(ctx context.Context, arg CompleteJobLockedParams) (int64, error)
- func (q *Queries) DeadJobs(ctx context.Context) ([]Job, error)
- func (q *Queries) DeleteAllJobs(ctx context.Context) error
- func (q *Queries) DeleteDeadJob(ctx context.Context, arg DeleteDeadJobParams) (int64, error)
- func (q *Queries) DeleteJob(ctx context.Context, arg DeleteJobParams) (int64, error)
- func (q *Queries) GetDeadJob(ctx context.Context, id string) (Job, error)
- func (q *Queries) GetJob(ctx context.Context, id string) (Job, error)
- func (q *Queries) InsertJob(ctx context.Context, arg InsertJobParams) (Job, error)
- func (q *Queries) JobStatusCounts(ctx context.Context) ([]JobStatusCountsRow, error)
- func (q *Queries) ListJobs(ctx context.Context, arg ListJobsParams) ([]Job, error)
- func (q *Queries) ListJobsByStatus(ctx context.Context, arg ListJobsByStatusParams) ([]Job, error)
- func (q *Queries) ListJobsByStatusType(ctx context.Context, arg ListJobsByStatusTypeParams) ([]Job, error)
- func (q *Queries) ListJobsByType(ctx context.Context, arg ListJobsByTypeParams) ([]Job, error)
- func (q *Queries) MarkJobDead(ctx context.Context, arg MarkJobDeadParams) error
- func (q *Queries) MarkJobDeadLocked(ctx context.Context, arg MarkJobDeadLockedParams) (int64, error)
- func (q *Queries) MarkJobFailed(ctx context.Context, arg MarkJobFailedParams) error
- func (q *Queries) MarkJobFailedLocked(ctx context.Context, arg MarkJobFailedLockedParams) (int64, error)
- func (q *Queries) PurgeJobsByStatus(ctx context.Context, arg PurgeJobsByStatusParams) (int64, error)
- func (q *Queries) QueryPendingJobs(ctx context.Context) ([]Job, error)
- func (q *Queries) ResetJob(ctx context.Context, arg ResetJobParams) (Job, error)
- func (q *Queries) ResetStaleJob(ctx context.Context, arg ResetStaleJobParams) error
- func (q *Queries) RetryAllDeadJobs(ctx context.Context, updatedAt pgtype.Timestamptz) (int64, error)
- func (q *Queries) RetryDeadJob(ctx context.Context, arg RetryDeadJobParams) (Job, error)
- func (q *Queries) ScheduledJobs(ctx context.Context, scheduledAt pgtype.Timestamptz) ([]Job, error)
- func (q *Queries) SetJobRunning(ctx context.Context, arg SetJobRunningParams) error
- func (q *Queries) StaleJobs(ctx context.Context, lockedAt pgtype.Timestamptz) ([]Job, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type ResetJobParams
- type ResetStaleJobParams
- type RetryDeadJobParams
- type SetJobRunningParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelJobParams ¶
type CancelJobParams struct {
ID string `json:"id"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type CompleteJobLockedParams ¶
type CompleteJobLockedParams struct {
ID string `json:"id"`
CompletedAt pgtype.Timestamptz `json:"completed_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
LockedBy pgtype.Text `json:"locked_by"`
}
type CompleteJobParams ¶
type CompleteJobParams struct {
ID string `json:"id"`
CompletedAt pgtype.Timestamptz `json:"completed_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type DeleteDeadJobParams ¶
type DeleteDeadJobParams struct {
ID string `json:"id"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type DeleteJobParams ¶
type DeleteJobParams struct {
ID string `json:"id"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type InsertJobParams ¶
type InsertJobParams struct {
ID string `json:"id"`
JobType pgtype.Text `json:"job_type"`
Priority int64 `json:"priority"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
Payload pgtype.Text `json:"payload"`
Status pgtype.Text `json:"status"`
CompletedAt pgtype.Timestamptz `json:"completed_at"`
ScheduledAt pgtype.Timestamptz `json:"scheduled_at"`
MaxRetries pgtype.Int8 `json:"max_retries"`
RetryCount pgtype.Int8 `json:"retry_count"`
ErrorMessage pgtype.Text `json:"error_message"`
LockedAt pgtype.Timestamptz `json:"locked_at"`
LockedBy pgtype.Text `json:"locked_by"`
Timeout pgtype.Int8 `json:"timeout"`
}
type Job ¶
type Job struct {
ID string `json:"id"`
JobType pgtype.Text `json:"job_type"`
Priority int64 `json:"priority"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
Payload pgtype.Text `json:"payload"`
Status pgtype.Text `json:"status"`
CompletedAt pgtype.Timestamptz `json:"completed_at"`
ScheduledAt pgtype.Timestamptz `json:"scheduled_at"`
MaxRetries pgtype.Int8 `json:"max_retries"`
RetryCount pgtype.Int8 `json:"retry_count"`
ErrorMessage pgtype.Text `json:"error_message"`
LockedAt pgtype.Timestamptz `json:"locked_at"`
LockedBy pgtype.Text `json:"locked_by"`
Timeout pgtype.Int8 `json:"timeout"`
}
type JobStatusCountsRow ¶
type ListJobsByStatusParams ¶
type ListJobsByTypeParams ¶
type ListJobsParams ¶
type MarkJobDeadLockedParams ¶
type MarkJobDeadParams ¶
type MarkJobDeadParams struct {
ID string `json:"id"`
ErrorMessage pgtype.Text `json:"error_message"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type MarkJobFailedParams ¶
type MarkJobFailedParams struct {
ID string `json:"id"`
RetryCount pgtype.Int8 `json:"retry_count"`
ScheduledAt pgtype.Timestamptz `json:"scheduled_at"`
ErrorMessage pgtype.Text `json:"error_message"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type PurgeJobsByStatusParams ¶
type PurgeJobsByStatusParams struct {
Status pgtype.Text `json:"status"`
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CompleteJob ¶
func (q *Queries) CompleteJob(ctx context.Context, arg CompleteJobParams) error
func (*Queries) CompleteJobLocked ¶
func (*Queries) DeleteDeadJob ¶
func (*Queries) GetDeadJob ¶
func (*Queries) JobStatusCounts ¶
func (q *Queries) JobStatusCounts(ctx context.Context) ([]JobStatusCountsRow, error)
func (*Queries) ListJobsByStatus ¶
func (*Queries) ListJobsByStatusType ¶
func (*Queries) ListJobsByType ¶
func (*Queries) MarkJobDead ¶
func (q *Queries) MarkJobDead(ctx context.Context, arg MarkJobDeadParams) error
func (*Queries) MarkJobDeadLocked ¶
func (*Queries) MarkJobFailed ¶
func (q *Queries) MarkJobFailed(ctx context.Context, arg MarkJobFailedParams) error
func (*Queries) MarkJobFailedLocked ¶
func (*Queries) PurgeJobsByStatus ¶
func (*Queries) QueryPendingJobs ¶
func (*Queries) ResetStaleJob ¶
func (q *Queries) ResetStaleJob(ctx context.Context, arg ResetStaleJobParams) error
func (*Queries) RetryAllDeadJobs ¶
func (*Queries) RetryDeadJob ¶
func (*Queries) ScheduledJobs ¶
func (*Queries) SetJobRunning ¶
func (q *Queries) SetJobRunning(ctx context.Context, arg SetJobRunningParams) error
type ResetJobParams ¶
type ResetJobParams struct {
ID string `json:"id"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type ResetStaleJobParams ¶
type ResetStaleJobParams struct {
ID string `json:"id"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type RetryDeadJobParams ¶
type RetryDeadJobParams struct {
ID string `json:"id"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type SetJobRunningParams ¶
type SetJobRunningParams struct {
ID string `json:"id"`
LockedAt pgtype.Timestamptz `json:"locked_at"`
LockedBy pgtype.Text `json:"locked_by"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
Click to show internal directories.
Click to hide internal directories.