summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-06-18 22:30:09 +0000
committerGerrit Code Review <review@openstack.org>2014-06-18 22:30:09 +0000
commitb98e3e14678e95341c36b6981962fdaf37213bd9 (patch)
treee3923a9511d47ba3ffc74a2cf1e74b075c387644
parent80d0194d8644fcbf3316c2c22f6db3109f230c24 (diff)
parent1a860ac47b23efd1f32e8fa5b61ee8d1e2aa6c21 (diff)
Merge "Refactor and add a check around a variable"
-rw-r--r--entropy/engine.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/entropy/engine.py b/entropy/engine.py
index de72ae6..cb571cc 100644
--- a/entropy/engine.py
+++ b/entropy/engine.py
@@ -77,6 +77,9 @@ class Engine(object):
77 # Watchdog-related variables 77 # Watchdog-related variables
78 self._watchdog_thread = None 78 self._watchdog_thread = None
79 79
80 # Serializer related variables
81 self._serializer = None
82
80 LOG.info('Created engine obj %s', self.name) 83 LOG.info('Created engine obj %s', self.name)
81 84
82 # TODO(praneshp): Move to utils? 85 # TODO(praneshp): Move to utils?
@@ -106,8 +109,9 @@ class Engine(object):
106 self.start_scheduler() 109 self.start_scheduler()
107 110
108 def start_scheduler(self): 111 def start_scheduler(self):
109 serializer = self.executor.submit(self.start_serializer) 112 if not self._serializer:
110 self.futures.append(serializer) 113 self._serializer = self.executor.submit(self.start_serializer)
114 self.futures.append(self._serializer)
111 115
112 # Start react scripts. 116 # Start react scripts.
113 self.futures.extend(self.start_react_scripts()) 117 self.futures.extend(self.start_react_scripts())