fixed task bug
Browse files
    	
        App/Transcription/Utils/fastapi_tasks.py
    CHANGED
    
    | @@ -3,12 +3,12 @@ from fastapi import UploadFile | |
| 3 | 
             
            from App.Transcription.Model import Transcriptions
         | 
| 4 |  | 
| 5 |  | 
| 6 | 
            -
            async def perform_background_task(file: UploadFile, task_id: str):
         | 
| 7 | 
             
                data = await bot.send_file(
         | 
| 8 | 
             
                    -1001925049183,
         | 
| 9 | 
             
                    file_size=file.size,
         | 
| 10 | 
             
                    caption=file.filename,
         | 
| 11 | 
            -
                    file= | 
| 12 | 
             
                )
         | 
| 13 | 
             
                # get entry and update
         | 
| 14 | 
             
                entry: Transcriptions = await Transcriptions.objects.filter(task_id=task_id).first()
         | 
|  | |
| 3 | 
             
            from App.Transcription.Model import Transcriptions
         | 
| 4 |  | 
| 5 |  | 
| 6 | 
            +
            async def perform_background_task(file_name:str,file: UploadFile, task_id: str):
         | 
| 7 | 
             
                data = await bot.send_file(
         | 
| 8 | 
             
                    -1001925049183,
         | 
| 9 | 
             
                    file_size=file.size,
         | 
| 10 | 
             
                    caption=file.filename,
         | 
| 11 | 
            +
                    file=file_name
         | 
| 12 | 
             
                )
         | 
| 13 | 
             
                # get entry and update
         | 
| 14 | 
             
                entry: Transcriptions = await Transcriptions.objects.filter(task_id=task_id).first()
         |