Package bs provides a richer and/or more domain-specific layer over github.com/kr/beanstalk, including active-record style Job type.
- func MustReserveWithoutTimeout(ts *beanstalk.TubeSet) (id uint64, body byte)
- type Job
This section is empty.
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.
Job represents a beanstalkd job, and holds a reference to the connection so that server actions can be taken as methods on the job.
Priority of the job, zero is most urgent, 4,294,967,295 is least.
Release the job, with its original priority and no delay.
Releases counts how many times the job has been released back to the tube.
TimeLeft as reported by beanstalkd, as a time.Duration. beanstalkd reports as int(seconds), which defines the (low) precision. Less than 1.0 seconds remaining will be reported as zero.