def __init__(self, root, **config):
self.root = root
self.config = config
store = self.config["dbm_path"]
os.makedirs(store, exist_ok=True)
self.http_path = config.get("http_path", "monitor")
self.oauth = github.OAuth(**root.config.secrets[self.config["name"]])
self.tokens = dbm.open(os.path.join(store, "tokens.db"), "cs")
self.sessions = dbm.open(os.path.join(store, "sessions.db"), "cs")
self.acl = config["access"]
self.logs_path = config["logs_path"]
os.makedirs(self.logs_path, exist_ok=True)
self.connections = []
self._ws_job_listeners = collections.defaultdict(list)
self._jobws_cb_map = collections.defaultdict(list)
self._ws_user_map = {}
self._user_events = collections.defaultdict(list)
评论列表
文章目录