Skip to content

Commit

Permalink
Simplify db module structure
Browse files Browse the repository at this point in the history
  • Loading branch information
tsagadar committed Aug 29, 2024
1 parent b892c5e commit bedf0f2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
3 changes: 1 addition & 2 deletions goosebit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
from fastapi.security import OAuth2PasswordRequestForm
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor as Instrumentor

from goosebit import api, realtime, ui, updater
from goosebit import api, realtime, ui, updater, db
from goosebit.api.telemetry import metrics
from goosebit.auth import get_user_from_request, login_user, redirect_if_authenticated
from goosebit.db import db
from goosebit.ui.nav import nav
from goosebit.ui.static import static
from goosebit.ui.templates import templates
Expand Down
11 changes: 11 additions & 0 deletions goosebit/db/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from tortoise import Tortoise

from goosebit.db.config import TORTOISE_CONF


async def init():
await Tortoise.init(config=TORTOISE_CONF)


async def close():
await Tortoise.close_connections()
11 changes: 0 additions & 11 deletions goosebit/db/db.py

This file was deleted.

0 comments on commit bedf0f2

Please sign in to comment.