Answer the stability, product-owner and prose reviews' first round
This commit is contained in:
@@ -5,8 +5,6 @@ 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")
|
||||
|
||||
|
||||
@@ -17,7 +15,7 @@ def retried(who: str, attempt: typing.Callable[[], T | Failure], effects: Effect
|
||||
result = attempt()
|
||||
if not isinstance(result, Failure):
|
||||
return result
|
||||
if failures == ATTEMPTS:
|
||||
if failures == 3:
|
||||
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(RETRY_DELAY_SECONDS)
|
||||
effects.sleep(60)
|
||||
|
||||
Reference in New Issue
Block a user