build: merge frontend and backend into a single repo

This commit is contained in:
pablohashescobar 2022-11-30 02:47:42 +05:30
parent 10ce333e6f
commit 26ec1e8c15
126 changed files with 8280 additions and 1 deletions

View file

@ -0,0 +1,23 @@
import redis
import os
from django.conf import settings
from urllib.parse import urlparse
def redis_instance():
if settings.REDIS_URL:
tls_url = os.environ.get("REDIS_TLS_URL", False)
url = urlparse(settings.REDIS_URL)
if tls_url:
url = urlparse(tls_url)
ri = redis.Redis(
host=url.hostname,
port=url.port,
password=url.password,
ssl=True,
ssl_cert_reqs=None,
)
else:
ri = redis.StrictRedis(host=settings.REDIS_HOST, port=settings.REDIS_PORT, db=0)
return ri