mirror of
https://github.com/OpenBMB/ChatDev.git
synced 2026-06-10 09:22:16 +00:00
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>