Answer the architecture pass's first round

This commit is contained in:
2026-10-02 08:52:20 +02:00
parent 211524196b
commit d42c99c37d
15 changed files with 97 additions and 72 deletions
+4 -2
View File
@@ -5,6 +5,8 @@ from loop_claude.effects import Effects
from loop_claude.failure import Failure
from loop_claude.stop import Stop
ATTEMPTS = 3
RETRY_DELAY_SECONDS = 60
T = typing.TypeVar("T")
@@ -15,7 +17,7 @@ def retried(who: str, attempt: typing.Callable[[], T | Failure], effects: Effect
result = attempt()
if not isinstance(result, Failure):
return result
if failures == 3:
if failures == ATTEMPTS:
return Stop(1, f"the {who} failed three times running: {result.reason}")
print(f"retrying the {who} in a minute: {result.reason}", file=sys.stderr)
effects.sleep(60)
effects.sleep(RETRY_DELAY_SECONDS)