merge a couple lines
This commit is contained in:
parent
6508ee1210
commit
44e2a491a0
1 changed files with 2 additions and 4 deletions
|
@ -169,8 +169,7 @@ async def try_ip(db, server_ip, checks, context, opts: Options, callback=None):
|
||||||
await sem.acquire()
|
await sem.acquire()
|
||||||
if not success:
|
if not success:
|
||||||
break
|
break
|
||||||
task = create_task(process(check))
|
tasks.append(create_task(process(check)))
|
||||||
tasks.append(task)
|
|
||||||
for task in tasks:
|
for task in tasks:
|
||||||
try:
|
try:
|
||||||
await task
|
await task
|
||||||
|
@ -225,8 +224,7 @@ async def try_all_ips(db, try_me, checks, context, opts: Options, callback=None)
|
||||||
# acquire now instead of within the task so
|
# acquire now instead of within the task so
|
||||||
# a ton of tasks aren't created all at once.
|
# a ton of tasks aren't created all at once.
|
||||||
await sem.acquire()
|
await sem.acquire()
|
||||||
task = create_task(process(ip))
|
tasks.append(create_task(process(ip)))
|
||||||
tasks.append(task)
|
|
||||||
for task in tasks:
|
for task in tasks:
|
||||||
await task
|
await task
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue