diff --git a/README.md b/README.md index c514f71..5c2deaa 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,13 @@ You can see worker pods spin up then complete by watching the status of all pods watch kubectl get pods ``` +To see progress and failed batches, connect to Redis with +``` +./mev redis +``` + +then query keys keys and values using the [spec shared by dramatiq](https://github.com/Bogdanp/dramatiq/blob/24cbc0dc551797783f41b08ea461e1b5d23a4058/dramatiq/brokers/redis/dispatch.lua#L24-L43) + To watch the logs for a given pod, take its pod name using the above, then run: ``` kubectl logs -f pod/mev-inspect-backfill-abcdefg diff --git a/mev b/mev index 1f56863..d42e8ee 100755 --- a/mev +++ b/mev @@ -23,6 +23,16 @@ function db(){ -- $DB_NAME --host=$host --user=$username } +function redis(){ + echo "To continue, enter 'shift + r'" + redis_password=$(get_kube_secret "redis" "redis-password") + kubectl run -i --rm --tty \ + --namespace default redis-client-$RANDOM \ + --env REDIS_PASSWORD=$redis_password \ + --image docker.io/bitnami/redis:6.2.6-debian-10-r0 \ + --command -- redis-cli -h redis-master -a $redis_password +} + case "$1" in db) echo "Connecting to $DB_NAME" @@ -30,13 +40,7 @@ case "$1" in ;; redis) echo "Connecting to redis" - echo "To continue enter 'shift + r'" - redis_password=$(get_kube_secret "redis" "redis-password") - kubectl run -i --rm --tty \ - --namespace default redis-client-$RANDOM \ - --env REDIS_PASSWORD=$redis_password \ - --image docker.io/bitnami/redis:6.2.6-debian-10-r0 \ - --command -- redis-cli -h redis-master -a $redis_password + redis ;; listener) kubectl exec -ti deploy/mev-inspect -- ./listener $2