Вот заголовок моей функции и соответствующий фрагмент кода:
Код: Выделить всё
@tasks_fn.on_task_dispatched(
retry_config=RetryConfig(max_attempts=5, min_backoff_seconds=1200),
rate_limits=RateLimits(max_concurrent_dispatches=10),
memory=MemoryOption.GB_32,
cpu=8,
timeout_sec=3600,
secrets=["OPENAI_KEY"], )
...
def download_highest_resolution(video_url, output_path):
logger.info("Downloading")
# Define a dictionary to store information about the downloaded file
downloaded_file_info = {}
output_file = f'{output_path}.mp4'
ydl_opts = {
'format': 'bestvideo[height
Подробнее здесь: [url]https://stackoverflow.com/questions/78699796/google-cloud-function-slow-download-speed-gen-2-cloud-run[/url]