Closed Kikkopanda closed 3 years ago
Did you try to use async for
?
...
async with client.connect(is_async=True, timeout=settings['ldap']['timeout']) as conn:
result = await conn.paged_search(*args, **kwargs)
async for r in result:
final_result.append(r)
logger.debug(len(final_result))
...
Hi noirello, That solved the problem. Thank you for helping resolve this issue for me.
When I try to run the paged search with the client connection as asynchronous I get all the results I'm expecting (1238)
However when I change the flags and functions to asynchronous I'm only getting the first page of results
I suspect that it's only returning the first page of results and what I've also noticed is that I'm also getting an extra 3 empty entries which I haven't been able to track down as to why yet.
I did one last test based on a previous issue you resolved #31 where you turned off auto_page_acquire and used the function acquire_next_page and that seemed to work for me
This was tested using bonsai 1.2.1 running in a docker container based on the image python:3.7.6-buster