-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Retry worker on runtime errors #512
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to 7aedee0 in 13 seconds
More details
- Looked at
18
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_gUn82EjsSlpmjdsw
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
from ..clients import temporal | ||
from .worker import create_worker | ||
|
||
|
||
@retry(wait=wait_fixed(20), retry=retry_if_exception_type(RuntimeError)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a stop condition to the retry decorator to prevent infinite retries. For example, you can use stop=stop_after_attempt(n)
to limit the number of retries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 791ad2b in 13 seconds
More details
- Looked at
33
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/worker/__main__.py:16
- Draft comment:
Consider refactoring the logging setup into a separate function or module if used in multiple places. - Reason this comment was not posted:
Confidence changes required:33%
The logging setup is repeated and could be refactored for reusability.
Workflow ID: wflow_QreCCRIFLe621Jr7
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Adds retry mechanism and logging to
main()
in__main__.py
for handlingRuntimeError
exceptions.main()
in__main__.py
usingtenacity
forRuntimeError
exceptions.DEBUG
level.This description was created by for 791ad2b. It will automatically update as commits are pushed.