|
@@ -1039,7 +1039,7 @@ class UserManagement(View):
|
|
|
return response.json(444)
|
|
|
customized_push_data['push_satus'] = False
|
|
|
CustomizedPush.objects.filter(id=customized_push_id).update(**customized_push_data)
|
|
|
- apscheduler_obj.del_job('customizedPushId_{}'.format(customized_push_id)) # 删除旧定时任务
|
|
|
+ apscheduler_obj.del_job('customized_push_id_{}'.format(customized_push_id)) # 删除旧定时任务
|
|
|
else: # 新增
|
|
|
customized_push = CustomizedPush.objects.create(**customized_push_data)
|
|
|
customized_push_id = customized_push.id
|
|
@@ -1072,7 +1072,7 @@ class UserManagement(View):
|
|
|
CustomizedPush.objects.filter(id=customized_push_id).delete()
|
|
|
# 删除定时任务
|
|
|
apscheduler_obj = ApschedulerObject()
|
|
|
- apscheduler_obj.del_job('customizedPushId_{}'.format(customized_push_id))
|
|
|
+ apscheduler_obj.del_job('customized_push_id_{}'.format(customized_push_id))
|
|
|
return response.json(0)
|
|
|
except Exception as e:
|
|
|
return response.json(500, 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|