Archived
将数据库合并并添加了配置文件
This commit is contained in:
11 files changed
+313
-254
No files matched your search
+1
-13
@@ -6,16 +6,4 @@
|
||||
# @File Name: __init__.py.py
|
||||
|
||||
|
||||
import os
|
||||
from bin.utils.logger import logger
|
||||
|
||||
if not os.path.exists('./bin/db/count.db'):
|
||||
logger.error('未检测到用户计数数据库')
|
||||
import sqlite3
|
||||
conn = sqlite3.connect('./bin/db/count.db', check_same_thread=False)
|
||||
cursor = conn.cursor()
|
||||
cursor.execute('create table ReqCount (name text primary key, times int)')
|
||||
conn.commit()
|
||||
cursor.close()
|
||||
conn.close()
|
||||
logger.info('已在./db 目录下创建了count.db数据库')
|
||||
__all__ = ['sqlite']
|
||||
Reference in New Issue
Block a user