Skip to content

Commit

Permalink
Move usage to v2 model
Browse files Browse the repository at this point in the history
  • Loading branch information
Iain-S committed Jan 3, 2025
1 parent 7845889 commit 40a4d93
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 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 @@ -18,6 +18,6 @@ WORKDIR /home/site/wwwroot

RUN ~/.local/share/pypoetry/venv/bin/poetry config virtualenvs.create false

COPY pyproject.toml poetry.lock ./
COPY pyproject.toml poetry.lock host.json ./

RUN ~/.local/share/pypoetry/venv/bin/poetry install --only main
2 changes: 1 addition & 1 deletion usage_function/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[2.*, 3.0.0)"
"version": "[4.*, 5.0.0)"
},
"functions": [
"usage",
Expand Down
1 change: 1 addition & 0 deletions usage_function/monthly_usage/function_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_dates() -> Union[None, Tuple[date], Tuple[date, date]]:
return day1, day2


@app.function_name(name="monthly_usage")
@app.timer_trigger(
schedule="0 10 */2 7,8 * *", arg_name="my_timer", run_on_startup=False
)
Expand Down

0 comments on commit 40a4d93

Please sign in to comment.