Skip to content

Commit

Permalink
Merge pull request #3 from therefromhere/daylight_saving_fix
Browse files Browse the repository at this point in the history
Daylight saving fix
  • Loading branch information
therefromhere authored Oct 14, 2023
2 parents 118c101 + d8e76f8 commit f812d82
Show file tree
Hide file tree
Showing 7 changed files with 924 additions and 679 deletions.
3 changes: 3 additions & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
!main.py
!sureflap_gcloud/*.py

# Ignore these others
tests/*

# Explicitly allow current dir. `gcloud deploy` fails without it.
!.
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
python-version: 3.11
- name: Run image
uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: poetry install
- name: Test
run: poetry run pytest -v
- name: Generate Requirements
run: poetry export --output=requirements.txt
- id: 'deploy'
Expand Down
13 changes: 12 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,19 @@ def update(request: flask.Request):
client = google.cloud.logging.Client()
client.setup_logging()

process()

retval = {"status": "ok"}

return flask.jsonify(retval)


def process():
logging.basicConfig()
logging.getLogger().setLevel(logging.INFO)

sureflap_gcloud.set_curfew()

return flask.jsonify(retval)

if __name__ == "__main__":
process()
Loading

0 comments on commit f812d82

Please sign in to comment.