Open JPTIZ opened 2 years ago
There are some files that are created by pico-bot that are never deleted automatically (example: https://github.com/caravelahc/pico-bot/blob/033e461622f419a3ab3edb3c100f3e1080ba2470/picobot/handlers.py#L419). 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).
autodelete(path)
There are some files that are created by pico-bot that are never deleted automatically (example: https://github.com/caravelahc/pico-bot/blob/033e461622f419a3ab3edb3c100f3e1080ba2470/picobot/handlers.py#L419). 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).