From 99059c6305120dc1df220c643e747f2d9b2ed3d4 Mon Sep 17 00:00:00 2001 From: "Maikel M. Wagteveld" Date: Fri, 18 Oct 2024 18:50:14 +0200 Subject: [PATCH] v0.0.4 --- Containerfile | 4 ++-- src/homewizard-exporter.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Containerfile b/Containerfile index c125284..8cc9c40 100644 --- a/Containerfile +++ b/Containerfile @@ -1,7 +1,7 @@ FROM python:3-slim LABEL authors="Maikel Wagteveld" -LABEL version="v0.0.3" +LABEL version="v0.0.4" WORKDIR /home/metrics COPY src/ /home/metrics @@ -10,4 +10,4 @@ RUN python3 -m pip install --no-cache-dir -r requirements.txt EXPOSE 9002 -CMD ["python3", "homewizard-exporter.py"] \ No newline at end of file +CMD ["python3", "homewizard-exporter.py", "--port", "9002"] \ No newline at end of file diff --git a/src/homewizard-exporter.py b/src/homewizard-exporter.py index 34b893e..f4faa70 100644 --- a/src/homewizard-exporter.py +++ b/src/homewizard-exporter.py @@ -107,7 +107,7 @@ async def main(): metrics[key].info({'value': value}) elif isinstance(value, datetime): metrics[key].info({'value': value.isoformat()}) - await asyncio.sleep(5) + await asyncio.sleep(int(INTERVAL)) except Exception as e: logging.error(f"Error fetching data: {e}")