Skip to content

Commit

Permalink
Merge pull request LC044#21 from LC044/dev_zsk
Browse files Browse the repository at this point in the history
Dev zsk
  • Loading branch information
LC044 authored Nov 22, 2023
2 parents eaab199 + 4340556 commit 640d7ac
Show file tree
Hide file tree
Showing 31 changed files with 1,014 additions and 13,524 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ app/DataBase/Msg/*
*.db
*.pyc
*.log
*.spec
test*
205 changes: 119 additions & 86 deletions .idea/workspace.xml

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions app/DataBase/msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@ def get_messages(username_):
'''
result = []
for cur in cursor:
cur.execute(sql, [username_])
result_ = cur.fetchall()
# print(len(result))
result += result_
try:
lock.acquire(True)
cur.execute(sql, [username_])
result_ = cur.fetchall()
# print(len(result))
result += result_
finally:
lock.release()
result.sort(key=lambda x: x[5])
return result

Expand All @@ -63,7 +67,7 @@ def get_message_by_num(username_, local_id):
from MSG
where StrTalker = ? and localId < ?
order by CreateTime desc
limit 30
limit 10
'''
result = []
try:
Expand Down
Loading

0 comments on commit 640d7ac

Please sign in to comment.