-
Notifications
You must be signed in to change notification settings - Fork 892
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
1 parent
590f874
commit 023b006
Showing
5 changed files
with
19 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
from scalar_fastapi import get_scalar_api_reference | ||
|
||
from .clients.pg import create_db_pool | ||
from .env import api_prefix, hostname, pool_max_size, protocol, public_port | ||
from .env import api_prefix, hostname, pg_dsn, pool_max_size, protocol, public_port | ||
from .queries.container import Queries | ||
|
||
|
||
|
@@ -86,10 +86,8 @@ def create_app(): | |
container = Queries() | ||
# FIXME: This does not work | ||
# container.init_resources() | ||
container.config.db.dsn.from_env( | ||
"PG_DSN", | ||
default="postgres://postgres:[email protected]:5432/postgres?sslmode=disable", | ||
) | ||
container.config.db.dsn.from_value(pg_dsn) | ||
container.config.db.client_pool_max_size.from_value(pool_max_size) | ||
app.container = container | ||
|
||
return app | ||
|
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 was deleted.
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
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