This script is ment to be used with a Redis instance connected to a Discord bot which utilizes zekrotja/drgs for cache management.
- Clone the gist in an empty directory.
git clone https://gist.github.com/zekroTJA/7502d0e867edc75c3450c3d86414c54e.git .
- Run a temporary
python:alpine
Docker container inside the network of your Redis instance with the script mounted and execute the script inside it.docker run --rm \ -v $PWD/dgrs-oldest-user.py:/tmp/dgrs-oldest-user.py:ro \ --network <the network ID your Redis container is in> \ python:alpine \ /bin/ash -c 'python3 -m pip install redis && python3 /tmp/dgrs-oldest-user.py -rs redis://<your Redis address>:6379/0'
If you want to list your Docker networks available, use the following command.
docker network ls