1.4 KiB
1.4 KiB
1. CLI Command Foundation
- 1.1 Create
backend/cli.pywith command parsing for force-fetch execution - 1.2 Add a force-fetch command entrypoint that can be invoked via Python module execution
- 1.3 Ensure command initializes required runtime context (env + database readiness)
2. Force-Fetch Execution Path
- 2.1 Wire command to existing news aggregation execution path (
process_and_store_newsor sync wrapper) - 2.2 Ensure command runs as a one-off operation without changing scheduler job configuration
- 2.3 Preserve existing deduplication, retry, fallback, and image processing behavior during manual runs
3. Operator Reporting and Exit Semantics
- 3.1 Add success output that includes stored item count for the forced run
- 3.2 Add failure output with actionable error details when fatal execution errors occur
- 3.3 Return exit code
0on success and non-zero on fatal failures
4. Recovery Workflow and Validation
- 4.1 Validate bootstrap workflow: force-fetch on a fresh deployment with no current items
- 4.2 Validate recovery workflow: force-fetch after simulated failed scheduled cycle
- 4.3 Validate repeated same-day manual runs do not create duplicate records under dedup policy
5. Documentation
- 5.1 Update
README.mdwith force-fetch command usage for first-time setup - 5.2 Document recovery-run usage and expected command output/exit behavior