Skip to content

Commit

Permalink
Merge pull request #148 from anmolbabu/fixes
Browse files Browse the repository at this point in the history
Add null check for sds sync thread which can be optional
  • Loading branch information
r0h4n authored Jan 31, 2017
2 parents 2bb3ae3 + 58fee82 commit 3639630
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tendrl/commons/manager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,21 @@ def __init__(
def stop(self):
LOG.info("%s stopping" % self.__class__.__name__)
self._job_consumer_thread.stop()
self._sds_sync_thread.stop()
if self._sds_sync_thread:
self._sds_sync_thread.stop()
self._central_store_thread.stop()

def start(self):
LOG.info("%s starting" % self.__class__.__name__)
self._central_store_thread.start()
self._sds_sync_thread.start()
if self._sds_sync_thread:
self._sds_sync_thread.start()
self._job_consumer_thread.start()


def join(self):
LOG.info("%s joining" % self.__class__.__name__)
self._job_consumer_thread.join()
self._sds_sync_thread.join()
if self._sds_sync_thread:
self._sds_sync_thread.join()
self._central_store_thread.join()

0 comments on commit 3639630

Please sign in to comment.