|
@ -127,6 +127,12 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
//计算指标
|
|
//计算指标
|
|
computequota();
|
|
computequota();
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
|
|
//延迟上一次key的生命周期
|
|
|
|
if(CachePool.getKeys()!=null&&CachePool.getKeys().size()>0){
|
|
|
|
for (String key :CachePool.getKeys()){
|
|
|
|
redisTemplate.expire(key, Integer.valueOf(currentExpire), TimeUnit.HOURS);//2小时过期
|
|
|
|
}
|
|
|
|
}
|
|
//如果出錯立即重新執行
|
|
//如果出錯立即重新執行
|
|
JobExecutionException e2 =new JobExecutionException(e);
|
|
JobExecutionException e2 =new JobExecutionException(e);
|
|
e2.setRefireImmediately(true);
|
|
e2.setRefireImmediately(true);
|
|
@ -174,6 +180,7 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
for (String key :RedisStorage.keys){
|
|
for (String key :RedisStorage.keys){
|
|
redisTemplate.expire(key, Integer.valueOf(currentExpire), TimeUnit.HOURS);//2小时过期
|
|
redisTemplate.expire(key, Integer.valueOf(currentExpire), TimeUnit.HOURS);//2小时过期
|
|
}
|
|
}
|
|
|
|
CachePool.addKeys(RedisStorage.keys);//缓存key
|
|
RedisStorage.keys.clear();//清空Key
|
|
RedisStorage.keys.clear();//清空Key
|
|
|
|
|
|
//更新统计时间
|
|
//更新统计时间
|