浏览代码

联通查询流量API增加缓存时间

zhangdongming 3 年之前
父节点
当前提交
1fd34d8800
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Object/UnicomObject.py

+ 2 - 1
Object/UnicomObject.py

@@ -257,7 +257,8 @@ class UnicomObjeect:
         """
         """
         flow_key = 'ASJ:UNICOM:FLOW:{}'
         flow_key = 'ASJ:UNICOM:FLOW:{}'
         usage_data = {'iccid': iccid, 'realTime': True}
         usage_data = {'iccid': iccid, 'realTime': True}
-        flow_usage_details = UnicomObjeect().get_flow_total_usage(flow_key.format(iccid), (60 * 10 + 3), **usage_data)
+        expire_time = 60 * 10 + 60
+        flow_usage_details = UnicomObjeect().get_flow_total_usage(flow_key.format(iccid), expire_time, **usage_data)
         # 当月实际总使用流量
         # 当月实际总使用流量
         flow_total_usage = 0
         flow_total_usage = 0
         if flow_usage_details and flow_usage_details['success']:
         if flow_usage_details and flow_usage_details['success']: