Implement Coletor Fiscal v3.2 SaaS-ready architecture#10
Implement Coletor Fiscal v3.2 SaaS-ready architecture#10ademirrodrigo wants to merge 8 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| from .config import settings | ||
|
|
||
| engine = create_engine(settings.database_url, connect_args={"check_same_thread": False}) |
There was a problem hiding this comment.
Make database engine creation SQLite-aware
The new persistence layer unconditionally passes connect_args={"check_same_thread": False} when creating the SQLAlchemy engine. That option is only valid for SQLite drivers; if DATABASE_URL points to PostgreSQL or another backend (which the SaaS‑ready architecture is supposed to support), SQLAlchemy will raise TypeError: Invalid argument(s) 'check_same_thread' sent to create_engine and the app fails during import. Wrap the argument so it is only supplied when the URL uses SQLite, otherwise omit it.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_6900d155dee88329a267792bed0f790b