这是我的函数在views.py中的样子:
def generate:
yuv_downscale.delay() // calling a function in tasks.py file
os.system(-i file1.yuv command to generate video.mp4) //takes input file1.yuv and generates video.mp4 (consumes less time)
// function in tasks.py file
def yuv_downscale:
os.system( generate file file1.yuv) // generates file1.yuv consumes around 30 mins
问题是我无法找到task.py生成的文件,即file1.yuv。我正在使用Django,Celery和Redis服务器。如果还有其他替代方法,请告诉我。
我的Redis服务器和celery设置很好: