Prepare LCM tasks for HA
[osm/LCM.git] / osm_lcm / lcm.py
index 11447c2..27a44cb 100644 (file)
@@ -46,8 +46,8 @@ min_RO_version = [0, 6, 3]
 min_n2vc_version = "0.0.2"
 min_common_version = "0.1.19"
 # uncomment if LCM is installed as library and installed, and get them from __init__.py
-lcm_version = '0.1.36'
-lcm_version_date = '2019-04-22'
+lcm_version = '0.1.41'
+lcm_version_date = '2019-06-19'
 health_check_file = path.expanduser("~") + "/time_last_ping"   # TODO find better location for this file
 
 
@@ -71,8 +71,6 @@ class Lcm:
         self.consecutive_errors = 0
         self.first_start = False
 
-        # contains created tasks/futures to be able to cancel
-        self.lcm_tasks = TaskRegistry()
         # logging
         self.logger = logging.getLogger('lcm')
         # get id
@@ -174,6 +172,9 @@ class Lcm:
             self.logger.critical(str(e), exc_info=True)
             raise LcmException(str(e))
 
+        # contains created tasks/futures to be able to cancel
+        self.lcm_tasks = TaskRegistry(self.worker_id, self.db, self.logger)
+
         self.ns = ns.NsLcm(self.db, self.msg, self.fs, self.lcm_tasks, self.ro_config, self.vca_config, self.loop)
         self.netslice = netslice.NetsliceLcm(self.db, self.msg, self.fs, self.lcm_tasks, self.ro_config, 
                                              self.vca_config, self.loop)