Celery 'function' object has no attribute 'delay' how to get return value after delay?

Hi I have a problem in getting async function return value.

this is my views.py code

def preprocess_log2(request,uuid):
    data = get_object_or_404(Adata, uuid=uuid)
    if request.method == "POST":
        result = log2_transform_task.delay(data.raw_path)
        test = result.get()
        data.mat_data = test 
        return redirect("raptorlite:home")
    return render(request, 'raptorlite/detail.html',{"data":data})

this is my task code

def log2_transform_task(raw:str, out_dir = None) -> str:
    return out_name

sorry for not uploading my source code but I checked result it work perfectly

and it is my settings.py

CELERY_BROKER_URL = 'redis://redis:6379/0'
result_extended = True
accept_content = ['application/json']
result_serializer = 'json'
task_serializer = 'json'
timezone = 'Asia/Seoul'
CELERY_RESULT_BACKEND = 'redis://redis:6379/0'

enter image description here

when I run code if not use result.get() it works well but I want to get return value so I followed celery docs however after using get to return value suddenly that error happended..

please help me..

I followed celery docs and I read about similar error case in here but I checked that function name do not duplicate

Back to Top