diff --git a/tangostationcontrol/tangostationcontrol/toolkit/retriever.py b/tangostationcontrol/tangostationcontrol/toolkit/retriever.py index 4a3c0be20aeb3c7ad2ba720694df6e9d3256c22b..b62c01fcc8059ed9dfc170f6af7a8858baad635e 100644 --- a/tangostationcontrol/tangostationcontrol/toolkit/retriever.py +++ b/tangostationcontrol/tangostationcontrol/toolkit/retriever.py @@ -15,6 +15,10 @@ class Retriever(ABC): """ The Retriever abstract class implements retrieve operations on a given DBMS """ + + def __init__(self): + self.session = self.connect_to_archiving_db() + self.ab = self.set_archiver_base() def create_session(self, creds): """ @@ -120,8 +124,8 @@ class RetrieverMySQL(Retriever): def __init__(self, cm_name: str = 'archiving/hdbpp/confmanager01'): self.cm_name = cm_name - self.session = self.connect_to_archiving_db() - self.ab = self.set_archiver_base() + + super().__init__() def connect_to_archiving_db(self): """ @@ -216,8 +220,8 @@ class RetrieverTimescale(Retriever): def __init__(self, cm_name: str = 'archiving/hdbppts/confmanager01'): self.cm_name = cm_name - self.session = self.connect_to_archiving_db() - self.ab = self.set_archiver_base() + + super().__init__() def connect_to_archiving_db(self): """