Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion understanding-asynchronous-programming/example_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

async def task(name, work_queue):
timer = Timer(text=f"Task {name} elapsed time: {{:.1f}}")
async with aiohttp.ClientSession() as session:
# default max_field_size=8190 is too low for Twitter's content-security-policy Header
async with aiohttp.ClientSession(max_field_size=16380) as session:
while not work_queue.empty():
url = await work_queue.get()
print(f"Task {name} getting URL: {url}")
Expand Down