mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-10 19:08:58 +08:00
Fix: improve recover_pending_tasks timeout (#7408)
### What problem does this PR solve? Fix the redis lock will always timeout (change the logic order release lock first) ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
552475dd5c
commit
c88e4b3fc0
@ -700,12 +700,13 @@ def recover_pending_tasks():
|
||||
f"time since delivered: {msg['time_since_delivered'] / 1000} s"
|
||||
)
|
||||
REDIS_CONN.requeue_msg(queue_name, SVR_CONSUMER_GROUP_NAME, msg['message_id'])
|
||||
|
||||
stop_event.wait(60)
|
||||
except Exception:
|
||||
logging.warning("recover_pending_tasks got exception")
|
||||
finally:
|
||||
redis_lock.release()
|
||||
stop_event.wait(60)
|
||||
|
||||
|
||||
|
||||
|
||||
async def main():
|
||||
|
Loading…
x
Reference in New Issue
Block a user