|
@@ -1,5 +1,6 @@
|
|
|
package com.fdkankan.scene.schedule;
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.fdkankan.redis.constant.RedisKey;
|
|
|
import com.fdkankan.redis.util.RedisLockUtil;
|
|
@@ -57,8 +58,12 @@ public class ScheduleJob {
|
|
|
if(!lock){
|
|
|
return;
|
|
|
}
|
|
|
- String task = (String) redisUtil.lGetIndex("transfer:tour:video", 0L);
|
|
|
+ String task = null;
|
|
|
try {
|
|
|
+ if(redisUtil.lGetSize("transfer:tour:video") < 1){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ task = (String) redisUtil.lGetIndex("transfer:tour:video", 0L);
|
|
|
log.info("开始导览视频转换,content:{}", task);
|
|
|
DownloadTourVideo downloadTourVideo = JSON.parseObject(task, DownloadTourVideo.class);
|
|
|
downloadTourVideoService.transferTourVideo(downloadTourVideo);
|