release lock on boot

This commit is contained in:
bakatrouble 2023-03-30 22:37:33 +03:00
parent c0323b4b29
commit d1809b9b51

View File

@ -24,6 +24,7 @@ dp = Dispatcher(bot)
async def check_updates():
async with redis.lock('e621:update'):
tag_list = [t.decode() for t in await redis.smembers('e621:subs')]
tag_list.sort()
@ -130,6 +131,7 @@ async def update(msg: Message):
async def background_on_start():
await redis.lock('e621:update').release()
while True:
await check_updates()
await asyncio.sleep(60)