mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-22 11:15:42 +00:00
Fix message queue persistence after auto-send
This commit is contained in:
parent
6664fc7f38
commit
83a58cf6ad
2 changed files with 5 additions and 1 deletions
|
|
@ -19,6 +19,8 @@ class MessageQueueSend(ApiHandler):
|
|||
|
||||
if send_all:
|
||||
count = mq.send_all_aggregated(context)
|
||||
if count:
|
||||
mark_dirty_for_context(context.id, reason="message_queue_send_all")
|
||||
return {"ok": True, "sent_count": count}
|
||||
|
||||
# Send single item
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import asyncio
|
|||
from helpers.extension import Extension
|
||||
from helpers import message_queue as mq
|
||||
from agent import AgentContext, Agent, LoopData
|
||||
from helpers.state_monitor_integration import mark_dirty_for_context
|
||||
|
||||
|
||||
class ProcessQueue(Extension):
|
||||
|
|
@ -34,4 +35,5 @@ class ProcessQueue(Extension):
|
|||
|
||||
# Send next queued message if task is not running
|
||||
if not context.is_running():
|
||||
mq.send_next(context)
|
||||
if mq.send_next(context):
|
||||
mark_dirty_for_context(context.id, reason="message_queue_auto_send")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue