Documentation ¶
Overview ¶
Package bs provides a richer and/or more domain-specific layer over github.com/kr/beanstalk, including active-record style Job type.
Index ¶
Constants ¶
View Source
const ( // deadlineSoonDelay defines a period to sleep between receiving // DEADLINE_SOON in response to reserve, and re-attempting the reserve. DeadlineSoonDelay = 1 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func MustReserveWithoutTimeout ¶
reserve-with-timeout until there's a job or something panic-worthy. Handles beanstalk.ErrTimeout by retrying immediately. Handles beanstalk.ErrDeadline by sleeping DeadlineSoonDelay before retry. panics for other errors.
Types ¶
type Job ¶
type Job struct { // The numeric beanstalkd-assigned job ID. Id uint64 // The job payload data. Body []byte // contains filtered or unexported fields }
Job represents a beanstalkd job, and holds a reference to the connection so that server actions can be taken as methods on the job.
Click to show internal directories.
Click to hide internal directories.