pass int for redis db

This commit is contained in:
dekzter 2025-03-06 12:52:08 -05:00
parent 23ce4b983e
commit dfeb5a7c7b

View file

@ -37,7 +37,7 @@ def stream_view(request, stream_id):
"""
try:
redis_host = getattr(settings, "REDIS_HOST", "localhost")
redis_client = redis.Redis(host=settings.REDIS_HOST, port=6379, db=getattr(settings, "REDIS_DB", "0"))
redis_client = redis.Redis(host=settings.REDIS_HOST, port=6379, db=int(getattr(settings, "REDIS_DB", "0")))
# Retrieve the channel by the provided stream_id.
channel = Channel.objects.get(channel_number=stream_id)