feat: add redis cache to store polls state

This commit is contained in:
2021-07-30 17:06:23 -04:00
parent 2336e159c7
commit db1bb161d6
8 changed files with 123 additions and 62 deletions

6
data/redis.py Normal file
View File

@@ -0,0 +1,6 @@
import os
from walrus import *
_REDIS_URL = os.getenv('REDIS_URL')
_db = Database.from_url(_REDIS_URL)
polls = _db.Hash("polls")