build: merge frontend and backend into a single repo
This commit is contained in:
parent
10ce333e6f
commit
26ec1e8c15
126 changed files with 8280 additions and 1 deletions
23
apiserver/plane/settings/redis.py
Normal file
23
apiserver/plane/settings/redis.py
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue