close redis

pull/3/head
Michael Yang 2023-08-03 09:35:28 -07:00
parent eb466b7ac5
commit 872341ec87
1 changed files with 7 additions and 2 deletions

View File

@ -108,6 +108,11 @@ parser.add_argument('--buffer-size', default=32, type=int)
args = parser.parse_args()
args.redis.parent.mkdir(parents=True, exist_ok=True)
redis = Redis(args.redis)
client.run(os.getenv('DISCORD_TOKEN'))
try:
redis = Redis(args.redis)
client.run(os.getenv('DISCORD_TOKEN'))
except KeyboardInterrupt:
pass
redis.close()