mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
refactor: Centralize retry timeout and use consistent value
This commit is contained in:
parent
26058c89fe
commit
6bb9b2567f
2 changed files with 5 additions and 3 deletions
|
@ -27,7 +27,7 @@ from aider.llm import litellm
|
|||
from aider.repo import ANY_GIT_ERROR, GitRepo
|
||||
from aider.repomap import RepoMap
|
||||
from aider.run_cmd import run_cmd
|
||||
from aider.sendchat import retry_exceptions, send_completion
|
||||
from aider.sendchat import RETRY_TIMEOUT, retry_exceptions, send_completion
|
||||
from aider.utils import format_content, format_messages, format_tokens, is_image_file
|
||||
|
||||
from ..dump import dump # noqa: F401
|
||||
|
@ -1131,7 +1131,7 @@ class Coder:
|
|||
except retry_exceptions() as err:
|
||||
self.io.tool_warning(str(err))
|
||||
retry_delay *= 2
|
||||
if retry_delay > 60:
|
||||
if retry_delay > RETRY_TIMEOUT:
|
||||
break
|
||||
self.io.tool_output(f"Retrying in {retry_delay:.1f} seconds...")
|
||||
time.sleep(retry_delay)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue