Skip to content

Commit

Permalink
Merge pull request #1623 from Sefaria/fix-mongo-cleanup
Browse files Browse the repository at this point in the history
helm(fix): correct mongo cleanup script
  • Loading branch information
edamboritz authored Sep 5, 2023
2 parents 22b4c70 + 261c915 commit bdf832a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ data:
{{ end }}
URI="${URI}${MONGO_HOST}/${DATABASE}?ssl=false&authSource=admin"
APSCHEDULER_URI="${URI}${MONGO_HOST}/${APSCHEDULER_NAME}?ssl=false&authSource=admin"
if [[ ! -z "$MONGO_REPLICASET_NAME" ]]; then
URI="${URI}&replicaSet=${MONGO_REPLICASET_NAME}"
APSCHEDULER_URI="${APSCHEDULER_URI}&replicaSet=${MONGO_REPLICASET_NAME}"
fi
mongo "$URI" <<EOF
mongo --host $MONGO_HOST $DB_NAME <<EOF
db.dropDatabase();
EOF
mongo --host $MONGO_HOST $APSCHEDULER_NAME <<EOF
mongo "$APSCHEDULER_URI" <<EOF
db.dropDatabase();
EOF
{{- end }}

0 comments on commit bdf832a

Please sign in to comment.