Test User 958dc05b7f
fix: replace atexit with BackgroundTask for temp zip cleanup
Using atexit to clean up temporary zip files is unreliable because
atexit handlers only run when the process exits, not after each
download. This means temp files accumulate on disk, one per download,
until the server restarts.

Replace with Starlette's BackgroundTask which runs cleanup after
the response is fully sent, ensuring temp files are deleted promptly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 20:17:09 +08:00
..
2026-01-07 16:24:01 +08:00
2026-03-11 10:49:52 +08:00
2026-03-11 11:22:18 +08:00
2026-03-11 10:49:52 +08:00
2026-01-07 16:24:01 +08:00
2026-01-07 16:24:01 +08:00