Add container; fix typo
All checks were successful
/ test (push) Successful in 43s

This commit is contained in:
phil 2024-12-12 04:32:05 +01:00
parent 0b8053aa2c
commit 5dae08de63
2 changed files with 11 additions and 1 deletions

10
Containerfile Normal file
View file

@ -0,0 +1,10 @@
# Build: podman build -t code.philo.ydns.eu/philorg/tinyseady-mailer -f Containerfile
FROM docker.io/python:3.12-alpine
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/
COPY . /src
WORKDIR /src
RUN uv sync --frozen --no-cache && uv pip install --system .
CMD tinysteady-mailer

View file

@ -206,7 +206,7 @@ async def mailer():
last_failure = sorted(failure_files, key=lambda f: f.lstat().st_mtime)[-1]
users = read_json(last_failure)
if len(users) == 0:
logger.info(f"No record in {last_failure} file, existing.")
logger.info(f"No record in {last_failure} file. Nothing to do, exiting.")
sys.exit(0)
logger.info(
f"Using a file with {len(users)} failed attempts for this config ({last_failure})"