fix(tasks): increase redis lock timeout and expiration for write_message_task

- Increase lock expiration time from 120 to 600 seconds (5 minutes)
- Increase lock timeout from 300 to 3600 seconds (1 hour)
- Prevents premature lock release during long-running memory write operations
This commit is contained in:
Ke Sun
2026-03-30 20:53:17 +08:00
parent 5e70d436a8
commit dbe387f666

View File

@@ -1180,8 +1180,8 @@ def write_message_task(
lock = RedisFairLock(
key=f"memory_write:{end_user_id}",
redis_client=redis_client,
expire=120,
timeout=300,
expire=600,
timeout=3600,
auto_renewal=True,
)
if not lock.acquire():