Explorar el Código

还原更新推送状态位置

locky hace 1 año
padre
commit
415e20aa5d
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 2 0
      Controller/CustomizedPushController.py
  2. 0 2
      Service/CustomizedPushService.py

+ 2 - 0
Controller/CustomizedPushController.py

@@ -59,6 +59,8 @@ class CustomizedPushView(View):
                 kwargs=kwargs)
             push_thread.start()
 
+            # 更新推送状态
+            customized_push_qs.update(push_satus=True)
             return response.json(0)
         except Exception as e:
             return HttpResponse(repr(e), status=500)

+ 0 - 2
Service/CustomizedPushService.py

@@ -122,8 +122,6 @@ class CustomizedPushObject:
                     kwargs=pre_push_kwargs)
                 pre_push_thread.start()
                 CUSTOMIZED_PUSH_LOGGER.info('customized_push_id:{}推送完成'.format(customized_push_id))
-            # 更新推送状态
-            CustomizedPush.objects.filter(id=customized_push_id).update(push_satus=True)
         except Exception as e:
             CUSTOMIZED_PUSH_LOGGER.info('定制化推送或保存数据异常,'
                                         'error_line:{},error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))