mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-03 01:47:23 -04:00
feat: add skip status tracking for job orchestration
Implement skip status tracking to fix jobs hanging when dates are filtered out. Jobs now properly complete when all model-days reach terminal states (completed/failed/skipped). Changes: - database.py: Add 'skipped' status to job_details CHECK constraint - job_manager.py: Update completion logic to count skipped as done - job_manager.py: Add skipped count to progress tracking - simulation_worker.py: Implement skip tracking with per-model granularity - simulation_worker.py: Add _filter_completed_dates_with_tracking() - simulation_worker.py: Add _mark_skipped_dates() - simulation_worker.py: Update _prepare_data() to use skip tracking - simulation_worker.py: Improve warning messages to distinguish skip types Skip reasons: - "Already completed" - Position data exists from previous job - "Incomplete price data" - Missing prices (weekends/holidays/future) The implementation correctly handles multi-model scenarios where different models have different completion states for the same date.
This commit is contained in:
@@ -105,7 +105,7 @@ def initialize_database(db_path: str = "data/jobs.db") -> None:
|
||||
job_id TEXT NOT NULL,
|
||||
date TEXT NOT NULL,
|
||||
model TEXT NOT NULL,
|
||||
status TEXT NOT NULL CHECK(status IN ('pending', 'running', 'completed', 'failed')),
|
||||
status TEXT NOT NULL CHECK(status IN ('pending', 'running', 'completed', 'failed', 'skipped')),
|
||||
started_at TEXT,
|
||||
completed_at TEXT,
|
||||
duration_seconds REAL,
|
||||
|
||||
Reference in New Issue
Block a user