mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-01-19 03:05:53 +08:00
Add Key field to PendingTask
This commit is contained in:
parent
f98c362925
commit
e63a5d4f3b
@ -111,6 +111,7 @@ func toActiveTasks(in []*asynq.ActiveTask) []*ActiveTask {
|
|||||||
|
|
||||||
type PendingTask struct {
|
type PendingTask struct {
|
||||||
*BaseTask
|
*BaseTask
|
||||||
|
Key string `json:"key"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func toPendingTask(t *asynq.PendingTask) *PendingTask {
|
func toPendingTask(t *asynq.PendingTask) *PendingTask {
|
||||||
@ -120,7 +121,10 @@ func toPendingTask(t *asynq.PendingTask) *PendingTask {
|
|||||||
Payload: t.Payload,
|
Payload: t.Payload,
|
||||||
Queue: t.Queue,
|
Queue: t.Queue,
|
||||||
}
|
}
|
||||||
return &PendingTask{base}
|
return &PendingTask{
|
||||||
|
BaseTask: base,
|
||||||
|
Key: t.Key(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func toPendingTasks(in []*asynq.PendingTask) []*PendingTask {
|
func toPendingTasks(in []*asynq.PendingTask) []*PendingTask {
|
||||||
|
Loading…
Reference in New Issue
Block a user