Use stack_id of None for service timer

In order to keep the engine service alive, we add a timer that periodically
does nothing. Calls to add_timer() require a stack_id, and currently we
pass cfg.CONF.periodic_interval. This is highly misleading, because the
value you pass for the stack_id has no effect on the interval. The cause
was a copy-paste error in 07884448fe, when
the code changed from calling ThreadGroup.add_timer() to
ThreadGroupManager.add_timer(). Use None as the stack ID instead.

Change-Id: Ia24a0d3ae9a0295fc811eb5300656399f426408b
This commit is contained in:
Zane Bitter 2017-10-19 17:44:33 -04:00
parent 7bb3587be1
commit 8aca0e99ff
1 changed files with 2 additions and 2 deletions

View File

@ -93,8 +93,8 @@ class ThreadGroupManager(object):
self.msg_queues = collections.defaultdict(list)
# Create dummy service task, because when there is nothing queued
# on self.tg the process exits
self.add_timer(cfg.CONF.periodic_interval, self._service_task)
# on any of the service's ThreadGroups, the process exits.
self.add_timer(None, self._service_task)
def _service_task(self):
"""Dummy task which gets queued on the service.Service threadgroup.