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

Add background command to download complete ingredient list #1862

Open
rolandgeider opened this issue Jan 5, 2025 · 5 comments
Open

Add background command to download complete ingredient list #1862

rolandgeider opened this issue Jan 5, 2025 · 5 comments

Comments

@rolandgeider
Copy link
Member

At the moment the command python3 manage.py sync-ingredients will download all ingridients from another wger instance, but this proces takes a looooooong time (several hours). We already have a version of this that runs on a celery queue every x months (sync_all_ingredients_task), but it would be really helpful if we could start this process manually with a mangement command python3 manage.py sync-ingredients-async

@crypto-a
Copy link

crypto-a commented Jan 5, 2025

Hello, I would like to work on this if it's still available?

@rolandgeider
Copy link
Member Author

Hi @crypto-a ! Sure, go ahead

(If you have questions, need help to setup everything, or anything feel free to ping me)

@crypto-a
Copy link

crypto-a commented Jan 8, 2025

@rolandgeider Thank you. I’ve completed the code, but I’m encountering some issues with testing. When I try to run the command directly, I get an error related to the function I’m calling. This indicates that the function is being invoked, but the code isn’t working as expected for me.

Do you have any advice on how I might resolve this? I suspect there might be an issue with celery.

@rolandgeider
Copy link
Member Author

yes, sounds like it, how did you setup the dev environment? If you installed django etc in a venv, you need to start celery manually as well: celery -A wger worker -l INFO

@crypto-a
Copy link

@rolandgeider Thanks for your help!

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

No branches or pull requests

2 participants