Skip to content

Connecting to REDIS

David McDonald edited this page Aug 17, 2023 · 4 revisions

Sometimes it might be necessary to connect to REDIS via cli to troubleshoot.

Connecting to redis involves the following steps:

  1. Go 'inside' the admin ecs container (please see Running commands inside ECS containers)
  2. Type the following commands
flask shell
from app.extensions import redis_client

(optional) To check if redis has connected successfully you can use the command

redis_client.redis_store.ping() 

(if you get a 'True', then it is ok to continue)

You can then use any redis-cli commands listed in this link https://redis-py.readthedocs.io/en/latest/commands.html. For example:

redis_client.redis_store.keys("*")
redis_client.redis_store.get("your-key-name")
redis_client.redis_store.delete("your-key-name)
Clone this wiki locally