Example #1
0
 def get_db_host(self):
     try:
         db_host = self._create_dictionary().get("db_host")
         if db_host is None:
             raise MissingConfParameter('db_host')
         return db_host
     except MissingConfParameter as e:
         log.error("{0}".format(e))
Example #2
0
 def get_sender(self):
     try:
         sender = self._create_dictionary().get("sender")
         if sender is None:
             raise MissingConfParameter('sender')
         return sender
     except MissingConfParameter as e:
         log.error("{0}".format(e))
Example #3
0
 def get_smtp_host(self):
     try:
         smtp_host = self._create_dictionary().get("smtp_host")
         if smtp_host is None:
             raise MissingConfParameter('smtp_host')
         return smtp_host
     except MissingConfParameter as e:
         log.error("{0}".format(e))
         exit(1)
Example #4
0
 def get_recipient(self):
     try:
         recipient = self._create_dictionary().get("email")
         if recipient is None:
             raise MissingConfParameter('email')
         return recipient
     except MissingConfParameter as e:
         log.error("{0}".format(e))
         exit(1)
Example #5
0
 def get_db_name(self):
     try:
         db_name = self._create_dictionary().get("db_name")
         if db_name is None:
             raise MissingConfParameter('db_name')
         return db_name
     except MissingConfParameter as e:
         log.error("{0}".format(e))
         exit(1)
Example #6
0
 def get_storage_folder(self):
     try:
         ing_folder = self._create_dictionary().get("storage_folder")
         if ing_folder is None:
             raise MissingConfParameter('strg_folder')
         return ing_folder
     except MissingConfParameter as e:
         log.error("{0}".format(e))
         exit(1)
Example #7
0
 def get_months(self):
     try:
         months = self._create_dictionary().get("months_nr")
         if months is None:
             raise MissingConfParameter('months_nr')
         return months
     except MissingConfParameter as e:
         log.error("{0}".format(e))
         exit(1)
Example #8
0
 def get_threads_number(self):
     try:
         threads_nr = self._create_dictionary().get("threads_nr")
         if threads_nr is None:
             raise MissingConfParameter('threads_nr')
         return int(threads_nr)
     except MissingConfParameter as e:
         log.error("{0}".format(e))
         exit(1)
Example #9
0
 def get_rsync_path(self):
     try:
         rsync_path = self._create_dictionary().get("rsync_folder")
         if rsync_path is None:
             raise MissingConfParameter('rsync_folder')
         return rsync_path
     except MissingConfParameter as e:
         log.error("{0}".format(e))
         exit(1)
Example #10
0
 def get_failures_path(self):
     try:
         failures_path = self._create_dictionary().get("failure_folder")
         if failures_path is None:
             raise MissingConfParameter('failure_folder')
         return failures_path
     except MissingConfParameter as e:
         log.error("{0}".format(e))
         exit(1)
Example #11
0
 def get_thumbs_path(self):
     try:
         thumbs_path = self._create_dictionary().get("thumbs_folder")
         if thumbs_path is None:
             raise MissingConfParameter('thumbs_folder')
         return thumbs_path
     except MissingConfParameter as e:
         log.error("{0}".format(e))
         exit(1)
Example #12
0
 def get_ingestion_path(self):
     try:
         ingestion_path = self._create_dictionary().get("ingest_folder")
         if ingestion_path is None:
             raise MissingConfParameter('ingest_folder')
         return ingestion_path
     except MissingConfParameter as e:
         log.error("{0}".format(e))
         exit(1)
Example #13
0
 def get_foreign_stations_filename(self):
     try:
         stations = self._create_dictionary().get("stations")
         if stations is None:
             raise MissingConfParameter('stations')
         return stations
     except MissingConfParameter as e:
         log.error("{0}".format(e))
         exit(1)
Example #14
0
 def get_preproc_path(self):
     try:
         preprocess_path = self._create_dictionary().get("process_folder")
         if preprocess_path is None:
             raise MissingConfParameter('process_folder')
         return preprocess_path
     except MissingConfParameter as e:
         log.error("{0}".format(e))
         exit(1)