mirror of
https://github.com/oarkflow/mq.git
synced 2025-10-05 07:57:00 +08:00
feat: add task completion
This commit is contained in:
9
queue.go
9
queue.go
@@ -43,10 +43,11 @@ func (b *Broker) NewQueue(name string) *Queue {
|
||||
}
|
||||
|
||||
type QueueTask struct {
|
||||
ctx context.Context
|
||||
payload *Task
|
||||
priority int
|
||||
index int // The index in the heap
|
||||
ctx context.Context
|
||||
payload *Task
|
||||
retryCount int
|
||||
priority int
|
||||
index int // The index in the heap
|
||||
}
|
||||
|
||||
type PriorityQueue []*QueueTask
|
||||
|
Reference in New Issue
Block a user