-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
79 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
ENVIRONMENT=dev | ||
OPENSTREETMAP_API_URL=https://master.apis.dev.openstreetmap.org/api/0.6/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ENVIRONMENT=main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,13 @@ | |
from datetime import timedelta | ||
|
||
import anyio | ||
import sentry_sdk | ||
from fastapi import FastAPI | ||
from fastapi.middleware.cors import CORSMiddleware | ||
from starlette.middleware.base import BaseHTTPMiddleware | ||
|
||
import api.v1.api as api | ||
from config import DEFAULT_CACHE_MAX_AGE, DEFAULT_CACHE_STALE, startup_setup | ||
from config import DEFAULT_CACHE_MAX_AGE, DEFAULT_CACHE_STALE, ENVIRONMENT, VERSION, startup_setup | ||
from middlewares.cache_middleware import CacheMiddleware | ||
from middlewares.profiler_middleware import profiler_middleware | ||
from middlewares.version_middleware import version_middleware | ||
|
@@ -16,6 +17,13 @@ | |
from states.country_state import get_country_state | ||
from states.worker_state import WorkerStateEnum, get_worker_state | ||
|
||
if ENVIRONMENT: | ||
sentry_sdk.init( | ||
dsn='https://[email protected]/3', | ||
release=VERSION, | ||
environment=ENVIRONMENT, | ||
) | ||
|
||
|
||
@asynccontextmanager | ||
async def lifespan(_): | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters