|
@@ -133,8 +133,11 @@ class ComboCronPushView(View):
|
|
|
|
|
|
@classmethod
|
|
|
def flow_warning_push(cls, response):
|
|
|
+ """
|
|
|
+ 流量到期或者流量预警消息推送
|
|
|
+ """
|
|
|
logger = logging.getLogger('info')
|
|
|
- flow_push_qs = UnicomFlowPush.objects.filter(type=0, status=0)
|
|
|
+ flow_push_qs = UnicomFlowPush.objects.filter(status=0)
|
|
|
if not flow_push_qs.exists():
|
|
|
return response.json(0)
|
|
|
for item in flow_push_qs:
|
|
@@ -184,7 +187,7 @@ class ComboCronPushView(View):
|
|
|
# 修改推送状态
|
|
|
UnicomFlowPush.objects.filter(id=item.id).update(status=1)
|
|
|
except Exception as e:
|
|
|
- logger.info('出错了~4G流量10%预警推送消息异常,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
+ logger.info('出错了~4G流量推送消息异常,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
continue
|
|
|
return response.json(0)
|
|
|
|