File size: 492 Bytes
72638cd
4ac9f00
6674573
4ac9f00
 
 
72638cd
 
 
4ac9f00
72638cd
4ac9f00
 
 
fd8d070
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from App import bot
from fastapi import UploadFile
from App.Transcription.Model import Transcriptions


async def perform_background_task(file: UploadFile, task_id: str):
    data = await bot.send_file(
        -1001925049183,
        file_size=file.size,
        caption=file.filename,
        file=f"./{file.filename}",
    )
    # get entry and update
    entry: Transcriptions = await Transcriptions.objects.filter(task_id=task_id).first()
    await entry.update(tl_file_id=str(data.id))