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

fix: fix daily tasks #6227

Merged
merged 1 commit into from
Dec 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:

dev-db-sync:
runs-on: ubuntu-latest
timeout-minutes: 180
strategy:
matrix:
env: [mongo-dev]
Expand Down Expand Up @@ -56,11 +57,13 @@ jobs:

refresh-products-tags:
runs-on: ubuntu-latest
timeout-minutes: 180
strategy:
matrix:
env: [mongo-dev]
environment: ${{ matrix.env }}
concurrency: ${{ matrix.env }}
needs: dev-db-sync
steps:
- name: Refresh MongoDB products_tags collection
uses: appleboy/ssh-action@master
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ import_more_sample_data:
import_prod_data:
@echo "🥫 Importing production data (~2M products) into MongoDB …"
@echo "🥫 This might take up to 10 mn, so feel free to grab a coffee!"
@echo "🥫 Removing old archive in case you have one"
( rm -f openfoodfacts-mongodbdump.tar.gz || true )
@echo "🥫 Downloading full MongoDB dump from production …"
wget https://static.openfoodfacts.org/data/openfoodfacts-mongodbdump.tar.gz
wget --no-verbose https://static.openfoodfacts.org/data/openfoodfacts-mongodbdump.tar.gz
@echo "🥫 Copying the dump to MongoDB container …"
docker cp openfoodfacts-mongodbdump.tar.gz po_mongodb_1:/data/db
@echo "🥫 Restoring the MongoDB dump …"
Expand Down