Update API/app.py
Browse files- API/app.py +2 -2
API/app.py
CHANGED
|
@@ -214,7 +214,7 @@ async def pixif(
|
|
| 214 |
items: pixifModel
|
| 215 |
):
|
| 216 |
post_ids = items.post_ids
|
| 217 |
-
semaphore = asyncio.Semaphore(
|
| 218 |
|
| 219 |
async with aiohttp.ClientSession(cookies=cookies, headers=headers) as session:
|
| 220 |
tasks = [process_post(post_id, session, semaphore) for post_id in post_ids]
|
|
@@ -228,7 +228,7 @@ import tempfile
|
|
| 228 |
from fastapi import BackgroundTasks
|
| 229 |
|
| 230 |
async def generate_tar_gz(posts, session):
|
| 231 |
-
semaphore = asyncio.Semaphore(
|
| 232 |
images = {}
|
| 233 |
|
| 234 |
async def fetch_image(post_id, image_url):
|
|
|
|
| 214 |
items: pixifModel
|
| 215 |
):
|
| 216 |
post_ids = items.post_ids
|
| 217 |
+
semaphore = asyncio.Semaphore(1000)
|
| 218 |
|
| 219 |
async with aiohttp.ClientSession(cookies=cookies, headers=headers) as session:
|
| 220 |
tasks = [process_post(post_id, session, semaphore) for post_id in post_ids]
|
|
|
|
| 228 |
from fastapi import BackgroundTasks
|
| 229 |
|
| 230 |
async def generate_tar_gz(posts, session):
|
| 231 |
+
semaphore = asyncio.Semaphore(1000)
|
| 232 |
images = {}
|
| 233 |
|
| 234 |
async def fetch_image(post_id, image_url):
|