This commit is contained in:
parent
0b8053aa2c
commit
5dae08de63
2 changed files with 11 additions and 1 deletions
10
Containerfile
Normal file
10
Containerfile
Normal 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
|
|
@ -206,7 +206,7 @@ async def mailer():
|
||||||
last_failure = sorted(failure_files, key=lambda f: f.lstat().st_mtime)[-1]
|
last_failure = sorted(failure_files, key=lambda f: f.lstat().st_mtime)[-1]
|
||||||
users = read_json(last_failure)
|
users = read_json(last_failure)
|
||||||
if len(users) == 0:
|
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)
|
sys.exit(0)
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Using a file with {len(users)} failed attempts for this config ({last_failure})"
|
f"Using a file with {len(users)} failed attempts for this config ({last_failure})"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue