Skip to content

fix/imports#65

Open
gabrielecalafange wants to merge 11 commits intodevfrom
fix/imports
Open

fix/imports#65
gabrielecalafange wants to merge 11 commits intodevfrom
fix/imports

Conversation

@gabrielecalafange
Copy link

@gabrielecalafange gabrielecalafange commented Jan 15, 2026

Implemented cleanup that marks stale imports as failed when they exceed the RabbitMQ message timeout, preventing endless in_progress loops and stale scheduled tasks. The scheduler now expires stuck imports before deciding whether to enqueue new ones, using the queue expiration setting as the cutoff, and records a clear timeout reason.

  • Updated report_import.py to add IMPORT_TIMEOUT_REASON, expire overdue scheduled/in_progress imports using the queue TTL, log the event, and reuse the same settings inside check_unprocessed_imports.
  • Added test_mark_stale_import_failed in test_schedule_imports.py to verify timed-out imports are flipped to failed with the proper reason and a fresh import is scheduled.

@gabrielecalafange gabrielecalafange marked this pull request as draft January 15, 2026 19:40
@gabrielecalafange gabrielecalafange marked this pull request as ready for review January 19, 2026 18:32
…y storing stale_import id before closing session
@gabrielecalafange gabrielecalafange marked this pull request as draft January 19, 2026 18:45
@gabrielecalafange gabrielecalafange marked this pull request as ready for review January 19, 2026 18:52
Copy link
Collaborator

@marianezei marianezei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants