Remove lock usage from master merge

This commit is contained in:
Lonami 2018-05-06 22:15:06 +02:00 committed by GitHub
parent 2691872503
commit dffbd2d689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -232,13 +232,12 @@ class SQLiteSession(MemorySession):
return types.updates.State(pts, qts, date, seq, unread_count=0)
def set_update_state(self, entity_id, state):
with self._db_lock:
c = self._cursor()
c.execute('insert or replace into update_state values (?,?,?,?,?)',
(entity_id, state.pts, state.qts,
state.date.timestamp(), state.seq))
c.close()
self.save()
c = self._cursor()
c.execute('insert or replace into update_state values (?,?,?,?,?)',
(entity_id, state.pts, state.qts,
state.date.timestamp(), state.seq))
c.close()
self.save()
def save(self):
"""Saves the current session object as session_user_id.session"""