Python 3: Use '//' instead of '/'
In python 3, division(/) returns a float. So use '//' instead of '/' in the case that an integer is required. Change-Id: I9170ea57d5b967533767871fa612a02d797cda17 Blueprint: neutron-python3
This commit is contained in:
parent
50d662d95a
commit
e3ba447d7f
|
@ -122,7 +122,7 @@ class AgentSchedulerDbMixin(agents_db.AgentDbMixin):
|
|||
self.periodic_agent_loop = loopingcall.FixedIntervalLoopingCall(
|
||||
function)
|
||||
# TODO(enikanorov): make interval configurable rather than computed
|
||||
interval = max(cfg.CONF.agent_down_time / 2, 1)
|
||||
interval = max(cfg.CONF.agent_down_time // 2, 1)
|
||||
# add random initial delay to allow agents to check in after the
|
||||
# neutron server first starts. random to offset multiple servers
|
||||
initial_delay = random.randint(interval, interval * 2)
|
||||
|
|
Loading…
Reference in New Issue