先记录日志,再进行测试
This commit is contained in:
parent
4d5d056a22
commit
ce39ff84ac
|
@ -473,7 +473,6 @@ def loc_change(data):
|
||||||
ep_loc_dict['time1'] = time2
|
ep_loc_dict['time1'] = time2
|
||||||
ep_loc_dict['area_fix_id'] = area_fix['id'] if area_fix else None
|
ep_loc_dict['area_fix_id'] = area_fix['id'] if area_fix else None
|
||||||
cache.set(key_str, ep_loc_dict)
|
cache.set(key_str, ep_loc_dict)
|
||||||
myLogger.info('位置信息', str(ep_loc_dict))
|
|
||||||
|
|
||||||
|
|
||||||
def handle_xx_event(name: str, data: dict):
|
def handle_xx_event(name: str, data: dict):
|
||||||
|
|
|
@ -169,7 +169,7 @@ class XxCommonViewSet(CreateModelMixin, CustomGenericViewSet):
|
||||||
|
|
||||||
@action(methods=['post'], detail=False,
|
@action(methods=['post'], detail=False,
|
||||||
authentication_classes=[], permission_classes=[],
|
authentication_classes=[], permission_classes=[],
|
||||||
serializer_class=serializers.Serializer, logging_methods=[]) # 日志
|
serializer_class=serializers.Serializer, logging_methods=['POST']) # 日志
|
||||||
def c_location(self, request, pk=None):
|
def c_location(self, request, pk=None):
|
||||||
loc_change(data=request.data['data'])
|
loc_change(data=request.data['data'])
|
||||||
return Response()
|
return Response()
|
||||||
|
@ -197,7 +197,7 @@ class XxCommonViewSet(CreateModelMixin, CustomGenericViewSet):
|
||||||
|
|
||||||
@action(methods=['post'], detail=False,
|
@action(methods=['post'], detail=False,
|
||||||
authentication_classes=[], permission_classes=[],
|
authentication_classes=[], permission_classes=[],
|
||||||
serializer_class=serializers.Serializer, logging_methods=[]) # 日志
|
serializer_class=serializers.Serializer, logging_methods=['POST']) # 日志
|
||||||
def c_lowpower(self, request, pk=None):
|
def c_lowpower(self, request, pk=None):
|
||||||
data = request.data
|
data = request.data
|
||||||
handle_xx_event(name='low_power', data=data['data'])
|
handle_xx_event(name='low_power', data=data['data'])
|
||||||
|
|
Loading…
Reference in New Issue