Added logic to load config from json & improved hosting and service providing

This commit is contained in:
2020-11-28 15:13:54 +01:00
parent ff577b121e
commit 44ffb4e574
29 changed files with 285 additions and 141 deletions

View File

@@ -9,6 +9,7 @@ from sh_edraft.utils.console import Console
class TimeFormatSettings(ConfigurationModelBase):
def __init__(self):
ConfigurationModelBase.__init__(self)
self._date_format: Optional[str] = None
self._time_format: Optional[str] = None
self._date_time_format: Optional[str] = None
@@ -55,5 +56,5 @@ class TimeFormatSettings(ConfigurationModelBase):
self._date_time_format = settings[TimeFormatSettingsNames.date_time_format.value]
self._date_time_log_format = settings[TimeFormatSettingsNames.date_time_log_format.value]
except Exception as e:
Console.write_line(f'[ ERROR ] [ {__name__} ]: Reading error in {TimeFormatSettingsNames.formats.value} settings')
Console.write_line(f'[ ERROR ] [ {__name__} ]: Reading error in {self.__name__} settings')
Console.write_line(f'[ EXCEPTION ] [ {__name__} ]: {e} -> {traceback.format_exc()}', 'red')

View File

@@ -3,7 +3,6 @@ from enum import Enum
class TimeFormatSettingsNames(Enum):
formats = 'TimeFormats'
date_format = 'DateFormat'
time_format = 'TimeFormat'
date_time_format = 'DateTimeFormat'