Connect to redis, return redis client, configure redis connection information as needed :return:
()
| 42 | |
| 43 | @staticmethod |
| 44 | def _connet_redis() -> Redis: |
| 45 | """ |
| 46 | Connect to redis, return redis client, configure redis connection information as needed |
| 47 | :return: |
| 48 | """ |
| 49 | return Redis( |
| 50 | host=db_config.REDIS_DB_HOST, |
| 51 | port=db_config.REDIS_DB_PORT, |
| 52 | db=db_config.REDIS_DB_NUM, |
| 53 | password=db_config.REDIS_DB_PWD, |
| 54 | ) |
| 55 | |
| 56 | def get(self, key: str) -> Any: |
| 57 | """ |