Merge "Add 'close' method to api_nb"

This commit is contained in:
Zuul 2018-04-18 18:12:13 +00:00 committed by Gerrit Code Review
commit 308b9bb830
1 changed files with 6 additions and 0 deletions

View File

@ -122,6 +122,12 @@ class NbApi(object):
self.db_change_callback)
self.subscriber.register_hamsg_for_db()
def close(self):
if self.publisher:
self.publisher.close()
if self.subscriber:
self.subscriber.close()
def db_recover_callback(self):
# only db with HA func can go in here
self.driver.process_ha()