Skip to content

Commit

Permalink
[UPDATE] add media volume to celery and celery-beat
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdiirh committed May 13, 2024
1 parent 37ea2d3 commit a23e5e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ services:
command: celery -A relohub worker -l DEBUG
networks:
- relohub
volumes:
- media:/app/media
depends_on:
- website
env_file:
Expand All @@ -65,6 +67,8 @@ services:
command: celery -A relohub beat -l DEBUG
networks:
- relohub
volumes:
- media:/app/media
depends_on:
- celery
env_file:
Expand Down
4 changes: 3 additions & 1 deletion job/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ def resolve_company(job_data: dict) -> Company:
result = requests.get(url)
if result.ok:
company.logo.save(
company.universal_name + ".png", ContentFile(result.content)
company.universal_name + ".png",
ContentFile(result.content),
save=False,
)
company.save()

Expand Down

0 comments on commit a23e5e1

Please sign in to comment.