mirror of
https://github.com/aaPanel/aaPanel.git
synced 2026-09-20 16:37:41 +02:00
Update to v8.3.0
This commit is contained in:
+27
-25
@@ -11,31 +11,33 @@ import http_requests
|
||||
http_requests.DEFAULT_TYPE = 'src'
|
||||
os.environ['BT_TASK'] = '1'
|
||||
|
||||
try:
|
||||
import panelPush
|
||||
import threading
|
||||
def main():
|
||||
try:
|
||||
import panelPush
|
||||
push = panelPush.panelPush()
|
||||
push.start()
|
||||
|
||||
push = panelPush.panelPush()
|
||||
push.start()
|
||||
# msg bind check
|
||||
flag = False
|
||||
sender = os.path.join(public.get_panel_path(), "data/mod_push_data/sender.json")
|
||||
if os.path.exists(sender):
|
||||
sender_info = public.readFile(sender)
|
||||
try:
|
||||
sender_info = json.loads(sender_info)
|
||||
except:
|
||||
pass
|
||||
if sender_info and isinstance(sender_info, list):
|
||||
for send in sender_info:
|
||||
if send.get("data") != {}:
|
||||
flag = True # has bind alarm
|
||||
break
|
||||
if flag:
|
||||
from mod.base.push_mod import PushSystem
|
||||
PushSystem().run()
|
||||
|
||||
# msg bind check
|
||||
flag = False
|
||||
sender = os.path.join(public.get_panel_path(), "data/mod_push_data/sender.json")
|
||||
if os.path.exists(sender):
|
||||
sender_info = public.readFile(sender)
|
||||
try:
|
||||
sender_info = json.loads(sender_info)
|
||||
except:
|
||||
pass
|
||||
if sender_info and isinstance(sender_info, list):
|
||||
for send in sender_info:
|
||||
if send.get("data") != {}:
|
||||
flag = True # has bind alarm
|
||||
break
|
||||
if flag is True:
|
||||
from mod.base.push_mod import PushSystem
|
||||
PushSystem().run()
|
||||
except Exception as e:
|
||||
pass
|
||||
os.system("echo no,{},{} > /tmp/push.pl".format(time.time(), e))
|
||||
|
||||
except Exception as e:
|
||||
pass
|
||||
os.system("echo no,{},{} > /tmp/push.pl".format(time.time(), e))
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user