forked from mtusi2026/mtusi2026lab2
feat: реализация второй лабы по тз
This commit is contained in:
@@ -5,7 +5,7 @@ import json
|
||||
import time
|
||||
|
||||
import httpx
|
||||
from helpers import read_all_messages
|
||||
from helpers import auth, read_all_messages
|
||||
|
||||
CLIENTS = 10
|
||||
MESSAGES_PER_CLIENT = 10
|
||||
@@ -21,7 +21,7 @@ async def _send_concurrently(
|
||||
|
||||
async def client_worker(user: dict) -> list[int]:
|
||||
async with httpx.AsyncClient(
|
||||
base_url=base_url, headers={"X-User-Id": user["id"]}, timeout=30
|
||||
base_url=base_url, headers=auth(user), timeout=30
|
||||
) as client:
|
||||
await start.wait()
|
||||
responses = await asyncio.gather(
|
||||
|
||||
Reference in New Issue
Block a user