优化相关设备的格式显示
This commit is contained in:
parent
b18805aa26
commit
4a3eaf87e8
6 changed files with 67 additions and 142 deletions
41
config.py.back
Normal file
41
config.py.back
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import os
|
||||
from datetime import timedelta
|
||||
|
||||
class Config:
|
||||
"""应用配置类"""
|
||||
|
||||
# Flask配置
|
||||
SECRET_KEY = os.environ.get('SECRET_KEY', 'dev-secret-key-change-in-production')
|
||||
|
||||
# OKX配置(公共接口不需要API密钥)
|
||||
OKX_API_KEY = os.environ.get('OKX_API_KEY', '')
|
||||
OKX_SECRET_KEY = os.environ.get('OKX_SECRET_KEY', '')
|
||||
OKX_PASSPHRASE = os.environ.get('OKX_PASSPHRASE', '')
|
||||
|
||||
# RSS配置
|
||||
RSS_TITLE = "Crypto RSS Service"
|
||||
RSS_DESCRIPTION = "Real-time cryptocurrency prices and more"
|
||||
RSS_LANGUAGE = "zh-cn"
|
||||
RSS_LINK = "http://localhost:5000"
|
||||
|
||||
# 缓存配置
|
||||
CACHE_TIMEOUT = timedelta(seconds=30) # 30秒缓存,适合低频率刷新
|
||||
|
||||
# 服务配置
|
||||
DEFAULT_CRYPTO_PAIR = "ETH-USDT"
|
||||
|
||||
@staticmethod
|
||||
def init_app(app):
|
||||
pass
|
||||
|
||||
class DevelopmentConfig(Config):
|
||||
DEBUG = True
|
||||
|
||||
class ProductionConfig(Config):
|
||||
DEBUG = False
|
||||
|
||||
config = {
|
||||
'development': DevelopmentConfig,
|
||||
'production': ProductionConfig,
|
||||
'default': DevelopmentConfig
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue