Change TaskMessage.ID type from uuid.UUID to string

This commit is contained in:
Ken Hibino
2021-09-10 06:29:37 -07:00
parent 83cae4bb24
commit 2261c7c9a0
13 changed files with 141 additions and 143 deletions

View File

@@ -191,10 +191,10 @@ func (p *processor) exec() {
}()
ctx, cancel := asynqcontext.New(msg, deadline)
p.cancelations.Add(msg.ID.String(), cancel)
p.cancelations.Add(msg.ID, cancel)
defer func() {
cancel()
p.cancelations.Delete(msg.ID.String())
p.cancelations.Delete(msg.ID)
}()
// check context before starting a worker goroutine.