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

@@ -25,7 +25,7 @@ func TestSchedulerRegister(t *testing.T) {
}{
{
cronspec: "@every 3s",
task: NewTask("task1", nil),
task: NewTask("task1", "", nil),
opts: []Option{MaxRetry(10)},
wait: 10 * time.Second,
queue: "default",
@@ -93,7 +93,7 @@ func TestSchedulerWhenRedisDown(t *testing.T) {
&SchedulerOpts{EnqueueErrorHandler: errorHandler},
)
task := NewTask("test", nil)
task := NewTask("test", "", nil)
if _, err := scheduler.Register("@every 3s", task); err != nil {
t.Fatal(err)
@@ -123,7 +123,7 @@ func TestSchedulerUnregister(t *testing.T) {
}{
{
cronspec: "@every 3s",
task: NewTask("task1", nil),
task: NewTask("task1", "", nil),
opts: []Option{MaxRetry(10)},
wait: 10 * time.Second,
queue: "default",