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

Move MongoDB to OFF2 #288

Open
Tracked by #182
alexgarel opened this issue Jan 4, 2024 · 2 comments
Open
Tracked by #182

Move MongoDB to OFF2 #288

alexgarel opened this issue Jan 4, 2024 · 2 comments

Comments

@alexgarel
Copy link
Member

alexgarel commented Jan 4, 2024

Move MongoDB to upgraded off2 server

@alexgarel alexgarel changed the title Move Mongodb to OFF2 Move MongoDB to OFF2 Jan 4, 2024
@alexgarel
Copy link
Member Author

@stephanegigandet and @john-gom: On off3, we launch the refresh_products_tags.js script via crontab for every db:

# m h  dom mon dow   command
0 2 * * * /usr/bin/mongo off /home/off/openfoodfacts-server/scripts/refresh_products_tags.js  >> /var/log/mongodb/refresh_products_tags_off.log
0 3 * * * /usr/bin/mongo obf /home/off/openfoodfacts-server/scripts/refresh_products_tags.js  >> /var/log/mongodb/refresh_products_tags_obf.log
0 4 * * * /usr/bin/mongo opf /home/off/openfoodfacts-server/scripts/refresh_products_tags.js  >> /var/log/mongodb/refresh_products_tags_opf.log
0 5 * * * /usr/bin/mongo opff /home/off/openfoodfacts-server/scripts/refresh_products_tags.js  >> /var/log/mongodb/refresh_products_tags_opff.log

But in the commit of openfoodfacts-query integration, this script was removed

Do you confirm we don't need it anymore. In this case can we also (manually) remove corresponding db in mongo ?

@alexgarel
Copy link
Member Author

Ok I think I can answer that we don't need those collections any more for openfoodfacts in it's latest versions (a pity we did not deactivate the cronjobs earlier !).

Still we need them for obf / opff and opf.

However, I will move the mongosh call to the corresponding servers, that's much more logical (so that they use the script at their current version).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants