Skip to content
Snippets Groups Projects
Forked from AURA / engine
Source project has a limited visibility.
  • Lars Kruse's avatar
    0b594e50
    refactor: use short-lived sessions when accessing the database · 0b594e50
    Lars Kruse authored
    Previously the database connection ("DB.session") was established during
    the startup of Aura Engine.
    This was causing conflicts in the threaded execution environment (#75).
    Now all sessions are acquired in a short-lived context:
    
      with DB.Session() as session:
          ...
    
    If database query performance is a real concern, then the session
    contexts could be moved to a higher level.
    
    Closes: #75
    0b594e50
    History
    refactor: use short-lived sessions when accessing the database
    Lars Kruse authored
    Previously the database connection ("DB.session") was established during
    the startup of Aura Engine.
    This was causing conflicts in the threaded execution environment (#75).
    Now all sessions are acquired in a short-lived context:
    
      with DB.Session() as session:
          ...
    
    If database query performance is a real concern, then the session
    contexts could be moved to a higher level.
    
    Closes: #75