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:
parent
7bb3587be1
commit
8aca0e99ff
@ -93,8 +93,8 @@ class ThreadGroupManager(object):
|
|||||||
self.msg_queues = collections.defaultdict(list)
|
self.msg_queues = collections.defaultdict(list)
|
||||||
|
|
||||||
# Create dummy service task, because when there is nothing queued
|
# Create dummy service task, because when there is nothing queued
|
||||||
# on self.tg the process exits
|
# on any of the service's ThreadGroups, the process exits.
|
||||||
self.add_timer(cfg.CONF.periodic_interval, self._service_task)
|
self.add_timer(None, self._service_task)
|
||||||
|
|
||||||
def _service_task(self):
|
def _service_task(self):
|
||||||
"""Dummy task which gets queued on the service.Service threadgroup.
|
"""Dummy task which gets queued on the service.Service threadgroup.
|
||||||
|
Loading…
Reference in New Issue
Block a user