From ae53e5cc8e20f85a35ae871198be1f64a6fe7939 Mon Sep 17 00:00:00 2001 From: vapao Date: Tue, 6 Jul 2021 00:24:06 +0800 Subject: [PATCH] fix issues --- spug_api/libs/spug.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spug_api/libs/spug.py b/spug_api/libs/spug.py index 3fb2b50..d34f083 100644 --- a/spug_api/libs/spug.py +++ b/spug_api/libs/spug.py @@ -6,6 +6,7 @@ from apps.setting.utils import AppSetting from apps.notify.models import Notify from libs.mail import Mail from libs.utils import human_datetime +from threading import Thread import requests import json @@ -154,10 +155,10 @@ class Notification: def dispatch(self, modes): for mode in modes: if mode == '1': - self._by_wx() + Thread(target=self._by_wx).start() elif mode == '3': - self._by_dd() + Thread(target=self._by_dd).start() elif mode == '4': - self._by_email() + Thread(target=self._by_email).start() elif mode == '5': - self._by_qy_wx() + Thread(target=self._by_qy_wx).start()