Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove scoped session since fastapi reuse threads, breaking thread local sessions #283

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

lchen-2101
Copy link
Collaborator

No description provided.

@lchen-2101 lchen-2101 added the bug Something isn't working label Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/regtech_user_fi_management/entities/engine
  engine.py
Project Total  

This report was generated by python-coverage-comment-action

@jcadam14 jcadam14 merged commit fe5bdee into main Jan 8, 2025
7 checks passed
from regtech_user_fi_management.config import settings

engine = create_engine(str(settings.inst_conn), echo=settings.db_logging).execution_options(
schema_translate_map={None: settings.inst_db_schema}
)
SessionLocal = scoped_session(sessionmaker(engine, expire_on_commit=False))
SessionLocal = Session = sessionmaker(engine, expire_on_commit=False)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding the Session name as a more syntactically correct term since it's not thread local anymore; clean up to remove SessionLocal later after downstream repos use the new term

@lchen-2101 lchen-2101 deleted the fix/rm_scoped_session branch January 8, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants