diff --git a/Dockerfile b/Dockerfile index 47084b4..845b53b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -108,7 +108,7 @@ RUN pip install -e . # Add the virtual environment to the PATH ENV PATH="/opt/venv/bin:$PATH" -HEALTHCHECK --interval=5s --retries=3 --timeout=5s CMD python ./src/cli.py health +HEALTHCHECK --interval=30s --retries=3 --timeout=30s CMD python ./src/cli.py health # Socket port for external health EXPOSE 49150 diff --git a/src/pyramid/connector/deezer/py_deezer.py b/src/pyramid/connector/deezer/py_deezer.py index e419d49..a7269cc 100644 --- a/src/pyramid/connector/deezer/py_deezer.py +++ b/src/pyramid/connector/deezer/py_deezer.py @@ -224,7 +224,7 @@ async def get_track_download_url( track = track["DATA"] if "DATA" in track else track if "MD5_ORIGIN" not in track: - raise DownloadLinkDecryptionError("MD5 is needed to decrypt the download link.") + raise DownloadLinkDecryptionError("MD5 of track is needed to decrypt the download link.") md5_origin = track["MD5_ORIGIN"] track_id = track["SNG_ID"] diff --git a/src/pyramid/tools/logs_handler.py b/src/pyramid/tools/logs_handler.py index 455a119..6aaa59b 100644 --- a/src/pyramid/tools/logs_handler.py +++ b/src/pyramid/tools/logs_handler.py @@ -15,7 +15,7 @@ def __init__(self): self.__console_format = "%(asctime)s %(levelname)s %(message)s" self.__file_format = "[{asctime}] [{levelname:<8}] {name}: {message}" - def init(self, info: ApplicationInfo, logs_dir, log_filename, error_filename): + def init(self, info: ApplicationInfo, logs_dir: str, log_filename: str, error_filename: str): self.__info = info self.__logs_dir = logs_dir self.__log_filename = log_filename @@ -46,7 +46,8 @@ def log_to_file(self): self.logger.addHandler(file_handler) def log_to_file_exceptions(self): - log_filename = os.path.join(self.__logs_dir, self.__error_filename) + log_filename = os.path.join(self.__logs_dir, "errors", self.__error_filename) + tools.create_parent_directories(log_filename) file_handler = logging.handlers.RotatingFileHandler( filename=log_filename,