From 19caaf885e19e93400c3798107d372ea20e8f237 Mon Sep 17 00:00:00 2001 From: Schimon Jehudah Date: Sun, 14 Aug 2022 17:30:35 +0000 Subject: [PATCH] Update slixfeed.py --- slixfeed.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/slixfeed.py b/slixfeed.py index 727b19b..aedc738 100644 --- a/slixfeed.py +++ b/slixfeed.py @@ -159,8 +159,9 @@ class Slixfeed(slixmpp.ClientXMPP): async def send_updates(self, event): #while not offline: - #while True: - async with self.lock: + while True: + #async with self.lock: + await self.lock.acquire() print(time.strftime("%H:%M:%S")) # print(offline) db_dir = get_default_dbdir() @@ -182,7 +183,7 @@ class Slixfeed(slixmpp.ClientXMPP): # d = self.send_ping(self, jid) # print('d') # print(d) - new = await initdb(jid, self.lock, False, get_unread) + new = await initdb(jid, False, False, get_unread) if new: msg = self.make_message(mto=jid, mbody=new, mtype='chat') @@ -201,6 +202,7 @@ class Slixfeed(slixmpp.ClientXMPP): # mtype='chat') #print(msg) #msg.send() + self.lock.release() await asyncio.sleep(60 * 3) # asyncio.ensure_future(send_updates(self))