1. Remove the mandatory dependency on MSB
[modeling/etsicatalog.git] / catalog / pub / msapi / sdc_controller.py
index c46503f..74a5ae8 100644 (file)
@@ -12,13 +12,11 @@ from apscheduler.scheduler import Scheduler
 from catalog.pub.Dmaap_lib.dmaap.consumer import ConsumerClient
 from catalog.pub.Dmaap_lib.dmaap.identity import IdentityClient
 from catalog.pub.Dmaap_lib.dmaap.publisher import BatchPublisherClient
-from catalog.pub.config.config import CONSUMER_GROUP, CONSUMER_ID, POLLING_INTERVAL, DMAAP_MR_IP, \
-    DMAAP_MR_PORT
+from catalog.pub.config.config import CONSUMER_GROUP, CONSUMER_ID, POLLING_INTERVAL, DMAAP_MR_BASE_URL
 from catalog.pub.msapi import sdc
 
 logger = logging.getLogger(__name__)
 
-DMAAP_MR_BASE_URL = "https://%s:%s" % (DMAAP_MR_IP, DMAAP_MR_PORT)
 ARTIFACT_TYPES_LIST = ["TOSCA_TEMPLATE", "TOSCA_CSAR"]
 
 
@@ -47,7 +45,7 @@ class SDCController(Thread):
             self.scheduler.start()
         except Exception as e:
             logger.error('start sdc controller failed.')
-            logger.error(e.message)
+            logger.error(str(e))
             logger.error(traceback.format_exc())
 
     def fetch_notification(self):
@@ -62,7 +60,7 @@ class SDCController(Thread):
                     process_notification(notification_callback)
         except Exception as e:
             logger.error('fetch message from dmaap failed.')
-            logger.error(e.message)
+            logger.error(str(e))
             logger.error(traceback.format_exc())
 
 
@@ -184,7 +182,7 @@ def send_notification_status(status_topic, now_ms, distribution_id, artifact, is
             logger.error('failed to send notification status, %s messages unsent', len(stuck))
     except Exception as e:
         logger.error('failed to send notification status.')
-        logger.error(e.message)
+        logger.error(str(e))
         logger.error(traceback.format_exc())
 
     return status