unzip-bot icon indicating copy to clipboard operation
unzip-bot copied to clipboard

[FEATURE REQUEST] Use volumes

Open EDM115 opened this issue 1 year ago • 1 comments
trafficstars

maybe instead of removing small packages, it would be better to do other adjustments
one I see is creating a volume, for downloading files and thumbs. may speed up I/O operations

source

EDM115 avatar Mar 07 '24 19:03 EDM115

It introduces issues with thumbnails :

  • command
docker run -d -v downloaded-volume:/app/Downloaded -v thumbnails-volume:/app/Thumbnails --env-file ./.env --network host --name unzip-bot-container unzip-bot
  • logs
2024-04-10 23:02:49,533 - INFO - unzipper - MainThread - Downloading thumbnail of ID…
2024-04-10 23:02:51,311 - WARNING - unzipper - MainThread - Error on thumb rename
2024-04-10 23:02:51,311 - ERROR - unzipper - MainThread - Error on Telegra.ph upload
2024-04-10 23:02:54,776 - ERROR - pyrogram.dispatcher - MainThread - [Errno 18] Invalid cross-device link: '/app/downloads/photo_2024-03-19_16-20-05_7356377760765313040.jpg' -> '/app/Thumbnails/not_resized_ID.jpg'
Traceback (most recent call last):
  File "/venv/lib/python3.11/site-packages/pyrogram/dispatcher.py", line 240, in handler_worker
    await handler.callback(self.client, *args)
  File "/venv/lib/python3.11/site-packages/pyromod/listen/listen.py", line 93, in resolve_listener
    await self.user_callback(client, message, *args)
  File "/app/unzipper/modules/commands.py", line 516, in thumb_add
    await add_thumb(unzipperbot, message)
  File "/app/unzipper/modules/ext_script/custom_thumbnail.py", line 49, in add_thumb
    os.rename(file, pre_thumb)
OSError: [Errno 18] Invalid cross-device link: '/app/downloads/photo_2024-03-19_16-20-05_7356377760765313040.jpg' -> '/app/Thumbnails/not_resized_ID.jpg'

EDM115 avatar Apr 11 '24 06:04 EDM115