Browse Source

添加出广告时间缓存用于判断出广告时间 更新时间为30秒1次

gufengshou1 1 năm trước cách đây
mục cha
commit
44d74871cd

+ 5 - 2
ad-engine-service/src/main/java/com/tzld/piaoquan/ad/engine/service/predict/container/AbTestConfigContainer.java

@@ -28,7 +28,11 @@ public class AbTestConfigContainer {
         timer.schedule(new TimerTask() {
             @Override
             public void run() {
-                initMap(null,"ab_test002");
+                try {
+                    initMap(null,"ab_test002");
+                }catch (Exception e){
+                    e.printStackTrace();
+                }
             }
         }, 0, 1000*30);
     }
@@ -40,7 +44,6 @@ public class AbTestConfigContainer {
         request.setTypeValue(typeValue);
         CommonResponse<JSONObject> response=longVideoFeign.getAbTestConfig(request);
         JSONObject object=response.getData();
-        System.out.println(adTestCode);
         for(Map.Entry<String,Object> entry:object.getInnerMap().entrySet()){
             for(Map<String,Object> map:(List<Map>)entry.getValue()){
                 if(adTestCode.equals(map.get("abExpCode").toString())){