fix(run_agent_background): update Redis operation handling to use asyncio tasks

This commit is contained in:
sharath 2025-06-05 02:00:39 +00:00
parent 27be48ed46
commit f3a2ce8de7
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -135,8 +135,8 @@ async def run_agent_background(
# Store response in Redis list and publish notification # Store response in Redis list and publish notification
response_json = json.dumps(response) response_json = json.dumps(response)
pending_redis_operations.append(redis.rpush(response_list_key, response_json)) pending_redis_operations.append(asyncio.create_task(redis.rpush(response_list_key, response_json)))
pending_redis_operations.append(redis.publish(response_channel, "new")) pending_redis_operations.append(asyncio.create_task(redis.publish(response_channel, "new")))
total_responses += 1 total_responses += 1
# Check for agent-signaled completion or error # Check for agent-signaled completion or error