Skip to content

Commit

Permalink
Check same threads is sqlite specific
Browse files Browse the repository at this point in the history
  • Loading branch information
Buried-In-Code committed Jun 4, 2024
1 parent 77ad965 commit 5de66be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion freyr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from freyr.console import CONSOLE

__version__ = "0.6.1"
__version__ = "0.6.2"


def get_cache() -> Path:
Expand Down
3 changes: 2 additions & 1 deletion freyr/database.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from sqlmodel import Session, SQLModel, create_engine

from freyr.constants import constants
from freyr.settings import Source

connect_args = {"check_same_thread": False}
connect_args = {"check_same_thread": False} if constants.settings.database.source == Source.SQLITE else {}
engine = create_engine(constants.settings.database.db_url, echo=False, connect_args=connect_args)


Expand Down

0 comments on commit 5de66be

Please sign in to comment.