Skip to content

Commit

Permalink
Timer (#46)
Browse files Browse the repository at this point in the history
* works

* works

* Fix linter errors
  • Loading branch information
Iain-S authored Jan 7, 2025
1 parent f6d698d commit a50e333
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions usage_function/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# ...except for the bare necessities
!poetry.lock
!pyproject.toml
!host.json
!usage/*.py
!usage/function.json
!utils/*.py
Expand Down
2 changes: 1 addition & 1 deletion usage_function/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions usage_function/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[2.*, 3.0.0)"
},
"functions": [
"monthly_usage",
"usage"
],
"functionTimeout": "04:00:00"
}
4 changes: 2 additions & 2 deletions usage_function/monthly_usage/function.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
],
Expand Down

0 comments on commit a50e333

Please sign in to comment.