I am trying to add a video upload to a task using django and celery + redis. The videos will be a maximum of 3mb but It seems passing the video in memory is problematic and reaches the limit for redis.
How can I find what the max memory limit is for redis?
This is what the video upload looks like:
@csrf_exempt
def tag_location(request):
if request.FILES.__contains__('file'):
image = request.FILES['file'].read()
else:
image = None
if request.FILES.__contains__('video-file'):
video = request.FILES['video-file'].read()
else:
video = None
tasks.tag_location.delay(image,video)
return JsonResponse({'response': 1})
The task is 100% working just sometimes the files are too large. Is there a way to just pass a file path for the video/image to redis rather than reading through the file and passing it through memory?
CONFIG GET maxmemory. Which Redis database are you using?