mybot/config/config.py

32 lines
723 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from apscheduler.executors.pool import ThreadPoolExecutor
import os
# 全局变量用来保存相关webhook推送消息
GLOBAL_VAR = {}
ENV_VAR = {}
class DefaultConfig(object):
DEBUG = False
timezone = "Asia/Shanghai"
executors = {
"default": ThreadPoolExecutor(20)
}
job_defaults = {
"coalesce": False,
"max_instances": 3
}
# 保存job配置的issue标题
issue_keyword = "[BOT_CONFIG]定时任务配置"
ROOT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
BOT_DIR = os.path.join(ROOT_DIR, "base_api")
CONFIG_DIR = os.path.join(ROOT_DIR, "config")
COMMON_DIR = os.path.join(ROOT_DIR, "common")
LOG_DIR = os.path.join(ROOT_DIR, "log")