feat: add task completion

This commit is contained in:
sujit
2024-10-23 15:00:05 +05:45
parent 63bb97c3b6
commit fe6f6d4c5b
2 changed files with 31 additions and 22 deletions

View File

@@ -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