diff --git a/.github/workflows/create_release_dev.yml b/.github/workflows/create_release_dev.yml index 833d3de5f..17cd22181 100644 --- a/.github/workflows/create_release_dev.yml +++ b/.github/workflows/create_release_dev.yml @@ -18,7 +18,7 @@ jobs: run: | echo GITHUB_CODE_VERSION=${{ env.BRANCH_NAME }} >> server/api/.env echo GITHUB_SHA=${{ github.sha }} >> server/api/.env - echo DEBUG=True + echo DEBUG=True >> server/api/.env - name: Build and Push Image to Docker Hub uses: docker/build-push-action@v1 with: diff --git a/server/api/code/lacity_data_api/main.py b/server/api/code/lacity_data_api/main.py index 6cd6936c5..8d148332a 100644 --- a/server/api/code/lacity_data_api/main.py +++ b/server/api/code/lacity_data_api/main.py @@ -14,7 +14,7 @@ def get_app(): - app = FastAPI(title="LA City 311 Data API", debug=DEBUG) + app = FastAPI(title="LA 311 Data API", debug=DEBUG) db.init_app(app) app.include_router(index.router) diff --git a/server/api/code/lacity_data_api/models/__init__.py b/server/api/code/lacity_data_api/models/__init__.py index 7e7168833..876793f23 100644 --- a/server/api/code/lacity_data_api/models/__init__.py +++ b/server/api/code/lacity_data_api/models/__init__.py @@ -17,7 +17,7 @@ cache = RedisCache( endpoint=config.CACHE_ENDPOINT, serializer=serializers.PickleSerializer(), - timeout=3, # lowering to 1 - pool_min_size=4, # raising min and max - pool_max_size=12, + timeout=10, # lowering to 1 + pool_min_size=5, # raising min and max + pool_max_size=20, ) diff --git a/server/api/code/lacity_data_api/routers/status.py b/server/api/code/lacity_data_api/routers/status.py index e72f8e7e2..5e420aa70 100644 --- a/server/api/code/lacity_data_api/routers/status.py +++ b/server/api/code/lacity_data_api/routers/status.py @@ -1,4 +1,5 @@ import datetime +import os from fastapi import APIRouter @@ -27,18 +28,13 @@ async def reset_cache(): description="Provides the status of backend systems") async def check_status_type(status_type: StatusTypes): if status_type == StatusTypes.api: - - cache_items = await status.get_cache_keys() - if len(cache_items) == 0: - await utilities.build_cache() - return { 'currentTime': datetime.datetime.now(), 'lastPulled': await status.get_last_updated(), 'stage': STAGE, 'version': GITHUB_CODE_VERSION, 'gitSha': GITHUB_SHA, - 'cachedItems': len(cache_items) + 'process': os.getpid() } if status_type == StatusTypes.database: