2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-10-24 10:36:12 +08:00

chore(): 设置jobId 为cmdb的instanceId

This commit is contained in:
pacinochen
2022-03-07 15:54:36 +08:00
parent b345b237c7
commit 21d91a1313
14 changed files with 94 additions and 90 deletions

View File

@@ -21,7 +21,7 @@ func makeTask(n int) *Task {
if err != nil {
panic(err)
}
return NewTask(fmt.Sprintf("task%d", n), b)
return NewTask(fmt.Sprintf("task%d", n), "", b)
}
// Simple E2E Benchmark testing with no scheduled tasks and retries.
@@ -222,7 +222,7 @@ func BenchmarkClientWhileServerRunning(b *testing.B) {
b.Log("Starting enqueueing")
enqueued := 0
for enqueued < 100000 {
t := NewTask(fmt.Sprintf("enqueued%d", enqueued), h.JSON(map[string]interface{}{"data": enqueued}))
t := NewTask(fmt.Sprintf("enqueued%d", enqueued), "", h.JSON(map[string]interface{}{"data": enqueued}))
if _, err := client.Enqueue(t); err != nil {
b.Logf("could not enqueue task %d: %v", enqueued, err)
continue