Merge "[zmq] Remove ZmqSocket.close_linger attribute"
This commit is contained in:
commit
6bbe8d1ac6
@ -56,7 +56,7 @@ zmq_opts = [
|
||||
help='Name of this node. Must be a valid hostname, FQDN, or '
|
||||
'IP address. Must match "host" option, if running Nova.'),
|
||||
|
||||
cfg.IntOpt('rpc_zmq_linger', default=-1,
|
||||
cfg.IntOpt('zmq_linger', default=-1,
|
||||
deprecated_group='DEFAULT',
|
||||
deprecated_name='rpc_cast_timeout',
|
||||
help='Number of seconds to wait before all pending '
|
||||
|
@ -46,12 +46,12 @@ class ZmqSocket(object):
|
||||
self.handle = context.socket(socket_type)
|
||||
self.handle.set_hwm(high_watermark)
|
||||
|
||||
self.close_linger = -1
|
||||
if self.conf.oslo_messaging_zmq.rpc_zmq_linger >= 0:
|
||||
# Set linger period
|
||||
linger = -1
|
||||
if self.conf.oslo_messaging_zmq.zmq_linger >= 0:
|
||||
# Convert seconds to milliseconds
|
||||
self.close_linger = \
|
||||
self.conf.oslo_messaging_zmq.rpc_zmq_linger * 1000
|
||||
self.handle.setsockopt(zmq.LINGER, self.close_linger)
|
||||
linger = self.conf.oslo_messaging_zmq.zmq_linger * 1000
|
||||
self.handle.setsockopt(zmq.LINGER, linger)
|
||||
|
||||
# Put messages to only connected queues
|
||||
self.handle.setsockopt(zmq.IMMEDIATE, 1 if immediate else 0)
|
||||
|
Loading…
Reference in New Issue
Block a user