Skip to content

Commit

Permalink
re added oauth2 creds
Browse files Browse the repository at this point in the history
  • Loading branch information
malloc-nbytes committed Feb 11, 2025
1 parent 9073b86 commit 236f587
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# ${{ runner.os }}-build-${{ env.cache-name }}-

- name: Build backend
run: docker compose build backend
run: docker compose build backend --no-cache

# TODO: Run pytests here using docker compose run or something

Expand Down
8 changes: 5 additions & 3 deletions BackEndFlask/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,12 @@ def setup_cron_jobs():
oauth2_token_fp = "/home/ubuntu/private/token.json"
oauth2_credentials = get_oauth2_credentials(oauth2_token_fp, oauth2_scopes)
# oauth2_service = googleapiclient.discovery.build("gmail", "v1", credentials=oauth2_credentials)
oauth2_service = None

# if oauth2_credentials is not None:
# oauth2_service = googleapiclient.discovery.build("gmail", "v1", credentials=oauth2_credentials)
if oauth2_credentials is not None:
try:
oauth2_service = googleapiclient.discovery.build("gmail", "v1", credentials=oauth2_credentials)
except Exception:
oauth2_service = None

# Register blueprints
from controller import bp
Expand Down

0 comments on commit 236f587

Please sign in to comment.