fg
This commit is contained in:
@@ -199,6 +199,13 @@ def generate_ideas_core(cluster_id: int, account_id: int = None, progress_callba
|
||||
Returns:
|
||||
Dict with 'success', 'idea_created', 'message', etc.
|
||||
"""
|
||||
import sys
|
||||
print("=" * 80, flush=True, file=sys.stdout)
|
||||
print("[GENERATE IDEAS CORE] Function started", flush=True, file=sys.stdout)
|
||||
print(f"[GENERATE IDEAS CORE] cluster_id: {cluster_id}", flush=True, file=sys.stdout)
|
||||
print(f"[GENERATE IDEAS CORE] account_id: {account_id}", flush=True, file=sys.stdout)
|
||||
print("=" * 80, flush=True, file=sys.stdout)
|
||||
|
||||
tracker = ConsoleStepTracker('generate_ideas')
|
||||
tracker.init("Task started")
|
||||
|
||||
@@ -279,7 +286,18 @@ def generate_ideas_core(cluster_id: int, account_id: int = None, progress_callba
|
||||
}
|
||||
|
||||
except Exception as e:
|
||||
tracker.error('Exception', str(e), e)
|
||||
logger.error(f"Error in generate_ideas_core: {str(e)}", exc_info=True)
|
||||
return {'success': False, 'error': str(e)}
|
||||
import sys
|
||||
import traceback
|
||||
error_msg = str(e)
|
||||
error_type = type(e).__name__
|
||||
|
||||
print("=" * 80, flush=True, file=sys.stdout)
|
||||
print(f"[GENERATE IDEAS CORE] ERROR: {error_type}: {error_msg}", flush=True, file=sys.stdout)
|
||||
print("[GENERATE IDEAS CORE] Full traceback:", flush=True, file=sys.stdout)
|
||||
traceback.print_exc(file=sys.stdout)
|
||||
print("=" * 80, flush=True, file=sys.stdout)
|
||||
|
||||
tracker.error('Exception', error_msg, e)
|
||||
logger.error(f"Error in generate_ideas_core: {error_msg}", exc_info=True)
|
||||
return {'success': False, 'error': error_msg, 'error_type': error_type}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user