Skip to content

Commit

Permalink
Update web config
Browse files Browse the repository at this point in the history
  • Loading branch information
TychoTheTaco committed Dec 14, 2023
1 parent 0840c09 commit 3012e61
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .idea/Twitch Drops Notifier.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion web/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@ handlers:
# required when static routes are defined, but can be omitted (along with
# the entire handlers section) when there are no static files defined.
- url: /.*
script: auto
script: auto

automatic_scaling:
min_instances: 1
max_instances: 1

inbound_services:
- warmup
12 changes: 12 additions & 0 deletions web/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ def get_user(user_id: str) -> Optional[Dict[str, Any]]:
return None


@app.route("/_ah/warmup")
def warmup():
"""Served stub function returning no content.
Your warmup logic can be implemented here (e.g. set up a database connection pool)
Returns:
An empty string, an HTTP code 200, and an empty object.
"""
return "", 200, {}


@app.route('/')
def index():
# Find user
Expand Down

0 comments on commit 3012e61

Please sign in to comment.