Recover updates in date ascending order

This commit is contained in:
KurimuzonAkuma 2024-03-08 00:11:21 +03:00
parent fd5d19dab1
commit 55aa162a38
2 changed files with 3 additions and 2 deletions

View File

@ -603,7 +603,7 @@ class Client(Methods):
pts, pts,
None, None,
updates.date, updates.date,
None updates.seq
) )
) )

View File

@ -163,7 +163,8 @@ class SQLiteStorage(Storage):
async def update_state(self, value: Tuple[int, int, int, int, int] = object): async def update_state(self, value: Tuple[int, int, int, int, int] = object):
if value == object: if value == object:
return self.conn.execute( return self.conn.execute(
"SELECT id, pts, qts, date, seq FROM update_state" "SELECT id, pts, qts, date, seq FROM update_state "
"ORDER BY date ASC"
).fetchall() ).fetchall()
else: else:
with self.conn: with self.conn: