1.2.2: Profile Upgraded
This commit is contained in:
@@ -8,6 +8,7 @@ sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from web.services.feature_service import FeatureService
|
||||
from web.config import Config
|
||||
from web.app import create_app
|
||||
import sqlite3
|
||||
|
||||
# Setup logging
|
||||
@@ -37,8 +38,10 @@ def main():
|
||||
|
||||
# 2. Rebuild Features using the centralized logic
|
||||
try:
|
||||
count = FeatureService.rebuild_all_features()
|
||||
logger.info(f"Successfully rebuilt features for {count} players.")
|
||||
app = create_app()
|
||||
with app.app_context():
|
||||
count = FeatureService.rebuild_all_features()
|
||||
logger.info(f"Successfully rebuilt features for {count} players.")
|
||||
except Exception as e:
|
||||
logger.error(f"Error rebuilding features: {e}")
|
||||
import traceback
|
||||
|
||||
Reference in New Issue
Block a user