Kaynağa Gözat

Remove 24-hour queue item expiration logic

Queue items were being marked as "expired" if older than 24 hours,
which breaks legitimate use cases like weekend print queues or
printers that are offline for extended periods.
maziggy 3 ay önce
ebeveyn
işleme
b4285913a9
1 değiştirilmiş dosya ile 0 ekleme ve 12 silme
  1. 0 12
      backend/app/services/print_scheduler.py

+ 0 - 12
backend/app/services/print_scheduler.py

@@ -76,18 +76,6 @@ class PrintScheduler:
                 if item.scheduled_time and item.scheduled_time > datetime.utcnow():
                 if item.scheduled_time and item.scheduled_time > datetime.utcnow():
                     continue
                     continue
 
 
-                # Safety: Skip stale items (older than 24 hours) to prevent phantom reprints
-                # This protects against items that got stuck in "pending" status due to
-                # crashes/restarts after the print already started
-                stale_threshold = timedelta(hours=24)
-                if item.created_at and datetime.utcnow() - item.created_at.replace(tzinfo=None) > stale_threshold:
-                    logger.warning(f"Queue item {item.id} is stale (created {item.created_at}), marking as expired")
-                    item.status = "expired"
-                    item.error_message = "Queue item expired - older than 24 hours"
-                    item.completed_at = datetime.utcnow()
-                    await db.commit()
-                    continue
-
                 # Skip items that require manual start
                 # Skip items that require manual start
                 if item.manual_start:
                 if item.manual_start:
                     continue
                     continue