def get_poller(): if eventletutils.is_monkey_patched('thread'): from oslo_messaging._drivers.zmq_driver.poller import green_poller return green_poller.GreenPoller() from oslo_messaging._drivers.zmq_driver.poller import threading_poller return threading_poller.ThreadingPoller()
def get_poller(zmq_concurrency='eventlet'): _raise_error_if_invalid_config_value(zmq_concurrency) if zmq_concurrency == 'eventlet' and _is_eventlet_zmq_available(): from oslo_messaging._drivers.zmq_driver.poller import green_poller return green_poller.GreenPoller() from oslo_messaging._drivers.zmq_driver.poller import threading_poller return threading_poller.ThreadingPoller()
def get_reply_poller(zmq_concurrency='eventlet'): _raise_error_if_invalid_config_value(zmq_concurrency) if zmq_concurrency == 'eventlet' and _is_eventlet_zmq_available(): return green_poller.HoldReplyPoller() return threading_poller.ThreadingPoller()