Skip to content

Commit

Permalink
chore: renamed db pool function to be more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
ashupednekar committed Oct 16, 2024
1 parent 3b3a51e commit f348cac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions robyn/scaffold/structured/sqlalchemy/server.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from conf import settings
from utils.db import get_pool
from utils.db import get_database_connection_pool

from robyn import Robyn
from robyn.helpers import discover_routes

app: Robyn = discover_routes("api.handlers")
# note: if you prefer to manuall refine routes, use your build_routes function instead

app.inject_global(db_connection_pool=get_pool())
app.inject_global(db_connection_pool=get_database_connection_pool())


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion robyn/scaffold/structured/sqlalchemy/utils/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from sqlalchemy.ext.asyncio import create_async_engine


def get_pool():
def get_database_connection_pool():
return create_async_engine(
settings.database_url,
pool_size=settings.db_pool_size,
Expand Down

0 comments on commit f348cac

Please sign in to comment.