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

Store org data in MongoDB to ease pro platform dashboard #10245

Closed
stephanegigandet opened this issue May 7, 2024 · 1 comment · Fixed by #10379
Closed

Store org data in MongoDB to ease pro platform dashboard #10245

stephanegigandet opened this issue May 7, 2024 · 1 comment · Fixed by #10379
Assignees
Labels
✨ Feature Features or enhancements to Open Food Facts server MongoDB We have 2 mongodb collections: one for current products, and one for obsolete products 🏭 Producers Platform - admin tools 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers

Comments

@stephanegigandet
Copy link
Contributor

We currently store organization objects in .sto files in the orgs directory.
In addition, we should also store this data in a new "orgs" collection of the "off" database in MongoDB.

This will be useful in particular to create a dashboard for the administrators of the pro platform, with a table that lists all organizations (#9737)

Related code is in lib/ProductOpener/Orgs.pm (see also data.pm and Products.pm at the end of store_product() to see how we store product data in MongoDB).

@stephanegigandet stephanegigandet added 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers 🏭 Producers Platform - admin tools labels May 7, 2024
@stephanegigandet stephanegigandet changed the title Store organizations data in MongoDB Store org data in MongoDB May 7, 2024
@stephanegigandet stephanegigandet changed the title Store org data in MongoDB Store org data in MongoDB to ease pro platform dashboard May 7, 2024
@teolemon teolemon added MongoDB We have 2 mongodb collections: one for current products, and one for obsolete products ✨ Feature Features or enhancements to Open Food Facts server labels May 7, 2024
@john-gom
Copy link
Contributor

Do we need to replicate in MongoDB if we are also going to replicate in off-query too? If we can create redis events with all of the needed data we can hydrate this directly in off-query without the need for MongoDB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature Features or enhancements to Open Food Facts server MongoDB We have 2 mongodb collections: one for current products, and one for obsolete products 🏭 Producers Platform - admin tools 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants