Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Close cursors before disconnect

  • Loading branch information...
commit 39b2670d1365a12370eef9f7f04004e89810c6f0 1 parent d4bb2e3
@dumbmatter authored
Showing with 4 additions and 0 deletions.
  1. +1 −0  TODO
  2. +3 −0  bbgm/__init__.py
View
1  TODO
@@ -5,6 +5,7 @@ BUG: "contract negotiation in progress" status appears in offseason
database crap
- optimize
- why is it so slow, and so disk thrashy?
+ - get rid of bulk_execute, which is currently only used to run the .sql file for the league schema in bbgm.core.league.new()
- are my keys correct/optimal/uptodate? unique keys?
- redo schema
- separate dbs for leagues: what user permissions do i need, exactly? update README
View
3  bbgm/__init__.py
@@ -116,6 +116,9 @@ def before_request():
def teardown_request(exception):
if hasattr(g, 'db'):
g.db.execute('COMMIT')
+ g.db.close()
+ if hasattr(g, 'dbd'):
+ g.dbd.close()
if hasattr(g, 'db_conn'):
g.db_conn.close()
Please sign in to comment.
Something went wrong with that request. Please try again.