U
    Ɉd?                     @   s@   d dl mZ d dlmZ d dlmZ ddlmZ edd ZdS )	    )shared_task)serializers)JsonResponse   )Transcriptsc                 C   sJ   t jj| d}|jr:|jr:|jr:td|g}td|iS tddiS dS )a  
    A Celery task that checks if three of the `Transcripts` model's attributes are not empty, and returns a JSON response 
    with serialized transcripts.
    
    Args:
        id_transcript (str): The ID of the transcript object to process.
        
    Returns:
        A JSON response with serialized transcripts if three of the `Transcripts` model's attributes are not empty. 
        Otherwise, a JSON response with a message that says "Please wait, your file is processing now."
    )id_transcriptjsonZtranscriptsmessagez)Please wait, your file is processing now.N)	r   objectsgetpath_srt_frpath_srt_espath_srt_enr   	serializer   )r   
transcriptdata r   3/var/www/html/subscibe_interface/interface/tasks.pycheck_transcripts   s
    r   N)	celeryr   django.corer   django.httpr   modelsr   r   r   r   r   r   <module>   s
   