This repository has been archived on 2026-08-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
RequestCounter/bin/db/__init__.py
T

19 lines
700 B
Python
Raw Normal View History

2022-02-25 18:48:56 +08:00
#!/usr/bin/env python3
# -- coding:utf-8 --
# @Author: markushammered@gmail.com
# @Development Tool: PyCharm
# @Create Time: 2022/2/4
# @File Name: __init__.py.py
2022-03-03 21:22:48 +08:00
import os
from bin.utils.logger import logger
from bin.utils.settings import Settings
if __name__ != '__main__':
if Settings().type.lower() == 'mysql' and not os.path.exists('./static/origin.sql'):
2022-03-13 10:52:16 +08:00
logger.warning('当前使用的数据库为MySQL请前往 https://filebase.vercel.app/db.sql 下载sql文件')
2022-03-03 21:22:48 +08:00
logger.warning('并使用 source 命令来导入MySQL数据库')
logger.warning('此消息只显示一次, 下次启动不显示')
open('./static/origin.sql', 'w').close()
2022-02-25 18:48:56 +08:00
__all__ = ['db']