mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-26 07:42:17 +08:00
fix: resolve go vet lint
This commit is contained in:
parent
37dfd746d4
commit
c4dc993241
@ -414,7 +414,6 @@ func (i *Inspector) ListDeadTasks(qname string, opts ...ListOption) ([]*DeadTask
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
return tasks, nil
|
return tasks, nil
|
||||||
return nil, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteAllScheduledTasks deletes all scheduled tasks from the specified queue,
|
// DeleteAllScheduledTasks deletes all scheduled tasks from the specified queue,
|
||||||
|
@ -1830,7 +1830,12 @@ func TestInspectorKillTaskByKeyKillsScheduledTask(t *testing.T) {
|
|||||||
},
|
},
|
||||||
wantDead: map[string][]base.Z{
|
wantDead: map[string][]base.Z{
|
||||||
"default": {},
|
"default": {},
|
||||||
"custom": {{m2, now.Unix()}},
|
"custom": {
|
||||||
|
{
|
||||||
|
Message: m2,
|
||||||
|
Score: now.Unix(),
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -1900,7 +1905,12 @@ func TestInspectorKillTaskByKeyKillsRetryTask(t *testing.T) {
|
|||||||
},
|
},
|
||||||
wantDead: map[string][]base.Z{
|
wantDead: map[string][]base.Z{
|
||||||
"default": {},
|
"default": {},
|
||||||
"custom": {{m2, now.Unix()}},
|
"custom": {
|
||||||
|
{
|
||||||
|
Message: m2,
|
||||||
|
Score: now.Unix(),
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -363,14 +363,14 @@ func TestStatusConcurrentAccess(t *testing.T) {
|
|||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
status.Get()
|
status.Get()
|
||||||
status.String()
|
_ = status.String()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
status.Set(StatusStopped)
|
status.Set(StatusStopped)
|
||||||
status.String()
|
_ = status.String()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
@ -353,7 +353,7 @@ func (r *RDB) listZSetEntries(key string, pgn Pagination) ([]base.Z, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
continue // bad data, ignore and continue
|
continue // bad data, ignore and continue
|
||||||
}
|
}
|
||||||
res = append(res, base.Z{msg, int64(z.Score)})
|
res = append(res, base.Z{Message: msg, Score: int64(z.Score)})
|
||||||
}
|
}
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
@ -3050,7 +3050,15 @@ func TestSchedulerEnqueueEvents(t *testing.T) {
|
|||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
entryID: "entry123",
|
entryID: "entry123",
|
||||||
events: []*base.SchedulerEnqueueEvent{{"task123", oneDayAgo}, {"task456", oneHourAgo}},
|
events: []*base.SchedulerEnqueueEvent{
|
||||||
|
{
|
||||||
|
TaskID: "task123",
|
||||||
|
EnqueuedAt: oneDayAgo,
|
||||||
|
}, {
|
||||||
|
TaskID: "task456",
|
||||||
|
EnqueuedAt: oneHourAgo,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
entryID: "entry123",
|
entryID: "entry123",
|
||||||
|
Loading…
Reference in New Issue
Block a user