Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove temporary files #39

Open
JPTIZ opened this issue Sep 12, 2022 · 0 comments
Open

Remove temporary files #39

JPTIZ opened this issue Sep 12, 2022 · 0 comments

Comments

@JPTIZ
Copy link
Member

JPTIZ commented Sep 12, 2022

There are some files that are created by pico-bot that are never deleted automatically (example:

video_path = MEDIA_DIR / f'{VIDEO_PREFIX}{user_id}.webm'
). They should be some kind of cleanup.

We could either use a context-manager like autodelete(path) where these files are used (to ensure they'll be deleted upon cleanup) or use stdlib's tempfile (as they're temporary files used only to upload videos to Telegram).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant