mirror of
https://github.com/xcat2/confluent.git
synced 2026-03-25 03:39:17 +00:00
Fix nodediscover clear
Nested async iteration of multiple confluent calls fail, break it into two distinct queries.
This commit is contained in:
@@ -270,7 +270,8 @@ async def list_discovery(options, session):
|
||||
print(row)
|
||||
|
||||
async def clear_discovery(options, session):
|
||||
async for mac in list_matching_macs(options, session):
|
||||
allmacs = [x async for x in list_matching_macs(options, session)]
|
||||
for mac in allmacs:
|
||||
async for res in session.delete('/discovery/by-mac/{0}'.format(mac)):
|
||||
if 'deleted' in res:
|
||||
print('Cleared info for {0}'.format(res['deleted']))
|
||||
|
||||
@@ -1615,9 +1615,7 @@ async def rescan():
|
||||
if scanner:
|
||||
return
|
||||
else:
|
||||
print("begin")
|
||||
scanner = util.spawn(blocking_scan())
|
||||
print("bg")
|
||||
await remotescan()
|
||||
|
||||
async def remotescan():
|
||||
|
||||
Reference in New Issue
Block a user