Skip to content

Commit

Permalink
Fix multithreading in getData
Browse files Browse the repository at this point in the history
Previously, the session was not automatically closing.
This was causing sqlite to throw multithreading errors.
  • Loading branch information
aloisklink committed Feb 6, 2019
1 parent 413db40 commit b5f3902
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nqm/iotdatabase/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@ def getData(self,
{x: a for x, a in row.__dict__.items() if x not in noproject}
for row in mongoquery.all()
]
# close the ORM session when done
session.close()

data = [schemaconverter.convertRowToTdx(
schema, row, data_dir) for row in projected_data]
Expand Down

0 comments on commit b5f3902

Please sign in to comment.