Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobRecorder ¶
type JobRecorder struct {
// contains filtered or unexported fields
}
func New ¶
func New(url string) (recorder *JobRecorder, err error)
func (*JobRecorder) RecordJob ¶
func (r *JobRecorder) RecordJob(owner string, id uint64, cmd string, data interface{}) (err error)
func (*JobRecorder) UpdateJob ¶
func (r *JobRecorder) UpdateJob(result JobResult) (err error)
type JobResult ¶
type JobResult struct { // Buried is true if the job was buried. Buried bool // Executed is true if the job command was executed (or attempted). Executed bool // ExitStatus of the command; 0 for success. ExitStatus int // JobId from beanstalkd. JobId uint64 // Stdout of the command. Stdout []byte // TimedOut indicates the worker exceeded TTR for the job. // Note this is tracked by a timer, separately to beanstalkd. TimedOut bool // Error raised while attempting to handle the job. Error error }
Click to show internal directories.
Click to hide internal directories.