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

[FEATURE REQUEST] Use volumes #286

Open
EDM115 opened this issue Mar 7, 2024 · 1 comment
Open

[FEATURE REQUEST] Use volumes #286

EDM115 opened this issue Mar 7, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request Priority D

Comments

@EDM115
Copy link
Owner

EDM115 commented Mar 7, 2024

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 EDM115 self-assigned this Mar 7, 2024
@EDM115 EDM115 added the enhancement New feature or request label Mar 7, 2024
@EDM115
Copy link
Owner Author

EDM115 commented Apr 11, 2024

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 added a commit that referenced this issue Apr 13, 2024
useful when 2 paths aren't on the same disk, ex Docker volumes
see #286 (comment)
@EDM115 EDM115 changed the title [FEATURE REQUEST] Use volumes on the Dockerfile [FEATURE REQUEST] Use volumes Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Priority D
Projects
None yet
Development

No branches or pull requests

1 participant