Re-use session. fix #252

This commit is contained in:
Ruud committed 2012-05-11 23:17:50 +02:00
1 parent 4bdd23e36a
commit 921a851b7e
17 files changed
+48 -48

No files matched your search

+4 -4
View File
@@ -65,7 +65,7 @@ class CoreNotifier(Notification):
q.update({Notif.read: True})
db.commit()
db.close()
#db.close()
return jsonified({
'success': True
@@ -91,7 +91,7 @@ class CoreNotifier(Notification):
ndict['type'] = 'notification'
notifications.append(ndict)
db.close()
#db.close()
return jsonified({
'success': True,
'empty': len(notifications) == 0,
@@ -116,7 +116,7 @@ class CoreNotifier(Notification):
ndict['time'] = time.time()
self.messages.append(ndict)
db.close()
#db.close()
return True
def frontend(self, type = 'notification', data = {}):
@@ -146,7 +146,7 @@ class CoreNotifier(Notification):
ndict['type'] = 'notification'
messages.append(ndict)
db.close()
#db.close()
self.messages = []
return jsonified({
@@ -22,6 +22,6 @@ class History(Notification):
)
db.add(history)
db.commit()
db.close()
#db.close()
return True