mirror of https://github.com/kortix-ai/suna.git
fix(run_agent_background): update Redis operation handling to use asyncio tasks
This commit is contained in:
parent
27be48ed46
commit
f3a2ce8de7
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue