diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c23b62f0..6d46de743 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/BackEndFlask/core/__init__.py b/BackEndFlask/core/__init__.py index f349fc7a5..0e2035e04 100644 --- a/BackEndFlask/core/__init__.py +++ b/BackEndFlask/core/__init__.py @@ -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