Phase 1+2: Rename CrowdSight + fix Thai vocabulary
Phase 1: Rename MiroFish → CrowdSight across all files - 39 files, 114+ occurrences replaced - Frontend, backend, locales, config, README, docker-compose Phase 2: Fix difficult Thai vocabulary - เมล็ดพันธุ์แห่งความจริง → ข้อมูลตั้งต้น - สกัดเอนทิตี → ดึงตัวละคร - ฉีดความจำ → เพิ่มความจำ - ออนโทโลยี → โครงสร้างข้อมูล - เอนทิตี → ตัวละคร - พลวัตกลุ่ม → พฤติกรรมกลุ่ม - โลกคู่ขนาน → โลกจำลอง Only string changes, no logic changes.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
MiroFish Backend - Flask应用工厂
|
||||
CrowdSight Backend - Flask应用工厂
|
||||
"""
|
||||
|
||||
import os
|
||||
@@ -27,7 +27,7 @@ def create_app(config_class=Config):
|
||||
app.json.ensure_ascii = False
|
||||
|
||||
# 设置日志
|
||||
logger = setup_logger('mirofish')
|
||||
logger = setup_logger('crowdsight')
|
||||
|
||||
# 只在 reloader 子进程中打印启动信息(避免 debug 模式下打印两次)
|
||||
is_reloader_process = os.environ.get('WERKZEUG_RUN_MAIN') == 'true'
|
||||
@@ -36,7 +36,7 @@ def create_app(config_class=Config):
|
||||
|
||||
if should_log_startup:
|
||||
logger.info("=" * 50)
|
||||
logger.info("MiroFish Backend 启动中...")
|
||||
logger.info("CrowdSight Backend 启动中...")
|
||||
logger.info("=" * 50)
|
||||
|
||||
# 启用CORS
|
||||
@@ -51,14 +51,14 @@ def create_app(config_class=Config):
|
||||
# 请求日志中间件
|
||||
@app.before_request
|
||||
def log_request():
|
||||
logger = get_logger('mirofish.request')
|
||||
logger = get_logger('crowdsight.request')
|
||||
logger.debug(f"请求: {request.method} {request.path}")
|
||||
if request.content_type and 'json' in request.content_type:
|
||||
logger.debug(f"请求体: {request.get_json(silent=True)}")
|
||||
|
||||
@app.after_request
|
||||
def log_response(response):
|
||||
logger = get_logger('mirofish.request')
|
||||
logger = get_logger('crowdsight.request')
|
||||
logger.debug(f"响应: {response.status_code}")
|
||||
return response
|
||||
|
||||
@@ -71,10 +71,10 @@ def create_app(config_class=Config):
|
||||
# 健康检查
|
||||
@app.route('/health')
|
||||
def health():
|
||||
return {'status': 'ok', 'service': 'MiroFish Backend'}
|
||||
return {'status': 'ok', 'service': 'CrowdSight Backend'}
|
||||
|
||||
if should_log_startup:
|
||||
logger.info("MiroFish Backend 启动完成")
|
||||
logger.info("CrowdSight Backend 启动完成")
|
||||
|
||||
return app
|
||||
|
||||
|
||||
Reference in New Issue
Block a user