mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
dx(orchestrate): reset poll interval when waiting_approval agents present
Sentry flagged that adaptive backoff could delay auto-approval by up to 5 minutes. Fix: treat waiting_approval agents same as active kick/recycle events — reset to base interval (30s) immediately.
This commit is contained in:
@@ -163,8 +163,9 @@ while true; do
|
||||
|
||||
echo "[$(date +%H:%M:%S)] Poll — ${RUNNING} running ${KICKED} kicked ${DONE} recycled (next in ${POLL_CURRENT}s)"
|
||||
|
||||
# Adaptive backoff: reset to base on activity, back off toward max when idle
|
||||
if (( KICKED > 0 || DONE > 0 )); then
|
||||
# Adaptive backoff: reset to base on activity or waiting_approval agents; back off when truly idle
|
||||
WAITING=$(jq '[.agents[] | select(.state == "waiting_approval")] | length' "$STATE_FILE" 2>/dev/null || echo 0)
|
||||
if (( KICKED > 0 || DONE > 0 || WAITING > 0 )); then
|
||||
POLL_CURRENT=$POLL_INTERVAL
|
||||
else
|
||||
POLL_CURRENT=$(( POLL_CURRENT * 3 / 2 ))
|
||||
|
||||
Reference in New Issue
Block a user