Skip to content

Commit

Permalink
Fix redis cache clear bug (#2780)
Browse files Browse the repository at this point in the history
  • Loading branch information
shifucun authored Jun 6, 2023
1 parent d047050 commit 7db5876
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/clearcache/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ gcloud container clusters get-credentials $CLUSTER_NAME \


POD_NAME=$(kubectl get pods -n website -l app=website-app -o=jsonpath='{.items[0].metadata.name}')
HOST=$(gcloud redis instances describe webserver-cache --region=us-central1 --format="get(host)")
HOST=$(gcloud redis instances describe webserver-cache --region="$REGION" --format="get(host)")
echo $HOST
script="import redis; redis_client = redis.StrictRedis(host=\"$HOST\", port=6379); resp = redis_client.flushall(asynchronous=True); print(resp)"
kubectl exec -it $POD_NAME -n website -- /bin/bash -c "python -c '$script'"

0 comments on commit 7db5876

Please sign in to comment.