Skip to content

Commit

Permalink
fix: fix typo in monogdb_dump (#10122)
Browse files Browse the repository at this point in the history
which hinder creating the deltas index.txt
  • Loading branch information
alexgarel committed Apr 12, 2024
1 parent e4d86c7 commit 0bad748
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/mongodb_dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ mongoexport --collection products --host $HOST --db $DB --query "{ \"last_modifi
mv new.${PREFIX}_products_${LASTTS}_${NEWTS}.json.gz ${PREFIX}_products_${LASTTS}_${NEWTS}.json.gz

# Delete all but the last 14 delta files - https://stackoverflow.com/a/34862475/11963
ls -tp ${PREFIX}-products_*.json.gz | grep -v '/$' | tail -n +14 | xargs -I {} rm -- {}
ls -tp ${PREFIX}_products_*.json.gz | grep -v '/$' | tail -n +14 | xargs -I {} rm -- {}

echo $NEWTS > $TSFILE
ls -tp ${PREFIX}-products_*.json.gz > index.txt
ls -tp ${PREFIX}_products_*.json.gz > index.txt

popd > /dev/null # data/delta

Expand Down

0 comments on commit 0bad748

Please sign in to comment.