diff --git a/job1.yaml b/job1.yaml index 3a94066..3224113 100644 --- a/job1.yaml +++ b/job1.yaml @@ -11,8 +11,8 @@ spec: spec: containers: - name: hotspot-queue-job - image: harbor.homieyy.com/job/dev/hotspot-queue:364ceb13bf57f7e5029bdb23d657caa188c31e59 - command: ["main"] + image: harbor.homieyy.com/job/dev/hotspot-queue:04581463b6917ace4405069e132d6edca8433c6d + command: ["./main"] env: - name: JM_ENVIRONMENT value: dev diff --git a/task/task.go b/task/task.go index 1c6d45e..da793c1 100644 --- a/task/task.go +++ b/task/task.go @@ -53,7 +53,9 @@ func NewTask() { ctx := context.Background() lLen := redisClient.LLen(ctx, hotspotQueueKey).Val() if lLen == 0 { - return + fmt.Println("等待") + time.Sleep(time.Second * 10) + continue } result, err := redisClient.RPop(ctx, hotspotQueueKey).Result() if err != nil {