using pickle instead of redis

This commit is contained in:
JS00000
2023-04-04 00:59:21 +08:00
parent 29422edcc9
commit 21a3b0d9a1
7 changed files with 57 additions and 26 deletions

11
app.py
View File

@@ -4,13 +4,22 @@ import os
from config import conf, load_config
from channel import channel_factory
from common.log import logger
from plugins import *
import signal
import sys
def sigterm_handler(_signo, _stack_frame):
conf().save_user_datas()
sys.exit(0)
def run():
try:
# load config
load_config()
# ctrl + c
signal.signal(signal.SIGINT, sigterm_handler)
# kill signal
signal.signal(signal.SIGTERM, sigterm_handler)
# create channel
channel_name=conf().get('channel_type', 'wx')