Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DelayQueue ¶
type DelayQueue struct {
// contains filtered or unexported fields
}
func NewDelayQueue ¶
func NewDelayQueue(redisPool *redis.Pool) *DelayQueue
func NewDelayQueueWithPrefix ¶
func NewDelayQueueWithPrefix(redisPool *redis.Pool, keyPrefix string) *DelayQueue
func (*DelayQueue) DeQueue ¶
func (q *DelayQueue) DeQueue(topics []string) (*Job, error)
获取任务 任务执行完成后需要调用 Remove 将任务删除
func (*DelayQueue) EnQueue ¶
func (q *DelayQueue) EnQueue(job *Job) error
func (*DelayQueue) Remove ¶
func (q *DelayQueue) Remove(jobId string) error
func (*DelayQueue) Run ¶
func (q *DelayQueue) Run() error
Run transits ready job to ready queue from delay bucket It's a thread safe method, you can run as many as you'd like to
Click to show internal directories.
Click to hide internal directories.