-
Notifications
You must be signed in to change notification settings - Fork 630
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
add try call to enhance robust of server #133
add try call to enhance robust of server #133
Conversation
Superjomn
commented
Jan 14, 2018
•
edited
Loading
edited
- when server encounters some error, it will sleep for some time and retry later.
…ce/server_revisit
…DL-1 into enhance/server_revisit
res = lib.retry(error_retry_times, function, error_sleep_time, *args, | ||
**kwargs) | ||
if not res: | ||
raise exceptions.IOError("server IO error, will retry latter.") |
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.
这个抛一个异常没啥用了吧,直接返回一个error_code和error msg?
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.
前台会处理500,直接抛500
status code前台现在没有统一的机制来处理
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.
LGTM, need to add error code later