mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fix: update variable name for clarity in semaphore creation
This commit is contained in:
parent
23b9e441d7
commit
cd450f5024
2 changed files with 2 additions and 2 deletions
|
|
@ -364,7 +364,7 @@ class Dispatcher(Router):
|
|||
"Run polling for bot @%s id=%d - %r", user.username, bot.id, user.full_name
|
||||
)
|
||||
|
||||
# Create a semaphore if concurrent_updates_limit is specified
|
||||
# Create semaphore if tasks_concurrency_limit is specified
|
||||
semaphore = None
|
||||
if tasks_concurrency_limit is not None and handle_as_tasks:
|
||||
semaphore = asyncio.Semaphore(tasks_concurrency_limit)
|
||||
|
|
|
|||
|
|
@ -810,7 +810,7 @@ class TestDispatcher:
|
|||
tasks_concurrency_limit: int,
|
||||
should_create_semaphore: bool,
|
||||
):
|
||||
"""Test that semaphore is created only when handle_as_tasks=True and concurrent_updates_limit is not None"""
|
||||
"""Test that semaphore is created only when handle_as_tasks=True and tasks_concurrency_limit is not None"""
|
||||
dispatcher = Dispatcher()
|
||||
|
||||
async def _mock_updates(*_):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue