diff --git a/usage_function/.dockerignore b/usage_function/.dockerignore index d7f4423..8536085 100644 --- a/usage_function/.dockerignore +++ b/usage_function/.dockerignore @@ -4,6 +4,7 @@ # ...except for the bare necessities !poetry.lock !pyproject.toml +!host.json !usage/*.py !usage/function.json !utils/*.py diff --git a/usage_function/Dockerfile b/usage_function/Dockerfile index b57385b..46d7679 100644 --- a/usage_function/Dockerfile +++ b/usage_function/Dockerfile @@ -20,6 +20,6 @@ WORKDIR /home/site/wwwroot RUN ~/.local/share/pypoetry/venv/bin/poetry config virtualenvs.create false -COPY pyproject.toml poetry.lock ./ +COPY host.json pyproject.toml poetry.lock ./ RUN ~/.local/share/pypoetry/venv/bin/poetry install --only main diff --git a/usage_function/host.json b/usage_function/host.json index 21df02e..4113c2e 100644 --- a/usage_function/host.json +++ b/usage_function/host.json @@ -12,5 +12,9 @@ "id": "Microsoft.Azure.Functions.ExtensionBundle", "version": "[2.*, 3.0.0)" }, + "functions": [ + "monthly_usage", + "usage" + ], "functionTimeout": "04:00:00" } diff --git a/usage_function/monthly_usage/function.json b/usage_function/monthly_usage/function.json index 0dc4a6f..e047b8e 100644 --- a/usage_function/monthly_usage/function.json +++ b/usage_function/monthly_usage/function.json @@ -2,8 +2,8 @@ "bindings": [ { "direction": "in", - "name": "every_other_hour_on_7th_and_8th", - "schedule": "0 10 0,2,4,6,8,10,12,14,16,18,20,22 7,8 * *", + "name": "mytimer", + "schedule": "0 10 */2 7,8 * *", "type": "timerTrigger" } ],