Skip to content

Commit 1eb1016

Browse files
committed
Fix output buffering, reduce queue_page_size to 100
1 parent eb8aa6b commit 1eb1016

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lidarr_queue_maintenance.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"match_import_min": 30, # match % >= this → try force import
1616
"match_oversight_max": 30, # match % < this → flag for agent oversight
1717
"stale_download_days": 14, # days before a stalled download is deleted + re-searched
18-
"queue_page_size": 500, # how many queue records to fetch at once
18+
"queue_page_size": 100, # how many queue records to fetch at once
1919
"missing_album_scan_count": 10, # how many oldest missing albums to check (kept low to avoid timeouts)
2020
"missing_search_threshold": 2, # searches >= this + zero grabs → flag problematic
2121

@@ -380,14 +380,14 @@ def main():
380380
# === EXECUTE ===
381381
results = {"imported": [], "import_failed": [], "deleted": [], "skipped": [], "unknown": []}
382382

383-
print(f"PHASE 1: Deleting {len(action_delete)} items...")
383+
print(f"PHASE 1: Deleting {len(action_delete)} items...", flush=True)
384384
for i, (rid, title, reason, album_id) in enumerate(action_delete, 1):
385385
delete_queue_item(rid, remove_from_client=True, album_id=album_id)
386386
results["deleted"].append(title[:60])
387-
if i % 100 == 0:
388-
print(f" {i}/{len(action_delete)} deleted...")
387+
if i % 50 == 0:
388+
print(f" {i}/{len(action_delete)} deleted...", flush=True)
389389

390-
print(f"\nPHASE 2: Importing {len(action_import)} items...")
390+
print(f"\nPHASE 2: Importing {len(action_import)} items...", flush=True)
391391
for rid, did, title, reason, album_id in action_import:
392392
if did:
393393
success = try_manual_import(did)

0 commit comments

Comments
 (0)