MCPcopy Create free account
hub / github.com/adobe/Marinus / __init__

Method __init__

python3_cron_scripts/libs3/DNSManager.py:47–64  ·  view source on GitHub ↗

Initialize the object with the necessary database configurations

(self, mongo_connector, alternative_collection=None)

Source from the content-addressed store, hash-verified

45 return logging.getLogger(__name__)
46
47 def __init__(self, mongo_connector, alternative_collection=None):
48 """
49 Initialize the object with the necessary database configurations
50 """
51 self._logger = self._log()
52 self._mongo_connector = mongo_connector
53 if alternative_collection is not None:
54 try:
55 self.all_dns_collection = getattr(
56 mongo_connector, alternative_collection
57 )()
58 except:
59 self._logger.error(
60 "FATAL: Could not fetch dynamic collection in DNS Manager"
61 )
62 exit(1)
63 else:
64 self.all_dns_collection = mongo_connector.get_all_dns_connection()
65
66 @staticmethod
67 def monthdelta(date, delta):

Callers

nothing calls this directly

Calls 2

_logMethod · 0.95

Tested by

no test coverage detected