OpenIxia / ixnetwork_restpy

The IxNetwork python client.
https://openixia.github.io/ixnetwork_restpy/#/
MIT License
30 stars 16 forks source link

Polling timer for operations should be adjustable #46

Open rfrye-github opened 3 years ago

rfrye-github commented 3 years ago

In connection.py, class Connection, method _send_recv, lines 406-427 is a while True loop. This polls the API server for completion of an async operation. Line 412 is sleep(1) to sleep 1 second between http GET polls. It would be useful to make this an optional parameter passed in to init and various methods using _execute, default value 1 (retaining existing behavior) so that if running long operations in constrained environments cycles and traffic are not wasted constantly checking for "are we there yet?" results.