polling: remove usage of eventlet.sleep()
In this commit we do replace usage of eventlet.sleep() with time.sleep(0). After that we remove monkey patching we should be able to completly remove this call. Related-bug: #2087939 Change-Id: If78f84923a8c582cbec14c359ffe7ddf56347733 Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
# under the License.
|
||||
|
||||
import contextlib
|
||||
import time
|
||||
|
||||
import eventlet
|
||||
from neutron_lib.plugins.ml2 import ovs_constants as ovs_const
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
@@ -71,8 +71,9 @@ class InterfacePollingMinimizer(base_polling.BasePollingManager):
|
||||
|
||||
def _is_polling_required(self):
|
||||
# Maximize the chances of update detection having a chance to
|
||||
# collect output.
|
||||
eventlet.sleep()
|
||||
# collect output. TODO(sahid): We can remove this line once
|
||||
# eventlet monkey patching removed.
|
||||
time.sleep(0)
|
||||
return self._monitor.has_updates
|
||||
|
||||
def get_events(self):
|
||||
|
||||
Reference in New Issue
Block a user