这是indexloc提供的服务,不要输入任何密码
Skip to content

Fix/postgresql #7620

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

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open

Conversation

ole-larsen
Copy link

@ole-larsen ole-larsen commented May 23, 2025

  1. add a try/except block to the loop in SqlConnectionManager.init where foreign key constraints are dropped using SQLAlchemy. The goal is to ensure that any unexpected issues (e.g., invalid constraints, engine dialect inconsistencies, etc.) are gracefully logged without crashing the initialization process.
  2. add psycopg2>=2.9.10 and freeze cython version
  3. _did_create_order and _did_fill_order methods now query the database to check if an Order record with the same order_id already exists.
  4. _did_fill_order has been enhanced to create a new Order record if one is missing at the time of a fill event.
  5. session.flush() is used after inserting new Order records to ensure the SQLAlchemy session registers the new object immediately
  6. xemm_multiple_levels.py: active_buy_executors_target = [e.config.target_profitability == target_profitability for e in active_buy_executors] and active_sell_executors_target = [e.config.target_profitability == target_profitability for e in active_sell_executors] changed to
    active_buy_executors_target = [
    e for e in active_buy_executors if e.config.target_profitability == target_profitability
    ]
    active_sell_executors_target = [
    e for e in active_sell_executors if e.config.target_profitability == target_profitability
    ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant