mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-29 03:16:22 -05:00
downloads: startup retries in a write session of its own
start_single_tasks still called retry_downloads() without a Session after it began requiring one, so any start after a completed refresh raised TypeError there: incomplete downloads were not reset and the download_on_startup enable after it never ran. Startup is not a request, so DownloadManager.retry_downloads_on_startup() opens and commits its own short write transaction. Tested through the method, not start_single_tasks: importing main registers its startup listeners on the shared app, and every later test in that worker then runs them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
24c5796fc6
commit
0297521dd1
3 changed files with 23 additions and 1 deletions
2
main.py
2
main.py
|
|
@ -309,7 +309,7 @@ async def start_single_tasks(app: Sanic):
|
|||
|
||||
if flags.refresh_complete.is_set():
|
||||
# Set all downloads to new.
|
||||
download_manager.retry_downloads()
|
||||
download_manager.retry_downloads_on_startup()
|
||||
|
||||
# Hotspot/throttle on startup are now handled by the Controller service.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue