|
|
@ -53,7 +53,9 @@ func NewTask() { |
|
|
|
ctx := context.Background() |
|
|
|
ctx := context.Background() |
|
|
|
lLen := redisClient.LLen(ctx, hotspotQueueKey).Val() |
|
|
|
lLen := redisClient.LLen(ctx, hotspotQueueKey).Val() |
|
|
|
if lLen == 0 { |
|
|
|
if lLen == 0 { |
|
|
|
return |
|
|
|
fmt.Println("等待") |
|
|
|
|
|
|
|
time.Sleep(time.Second * 10) |
|
|
|
|
|
|
|
continue |
|
|
|
} |
|
|
|
} |
|
|
|
result, err := redisClient.RPop(ctx, hotspotQueueKey).Result() |
|
|
|
result, err := redisClient.RPop(ctx, hotspotQueueKey).Result() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|