Skip to content
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

Merged
merged 7 commits into from
Jan 14, 2018

Conversation

Superjomn
Copy link
Contributor

@Superjomn Superjomn commented Jan 14, 2018

  • when server encounters some error, it will sleep for some time and retry later.

res = lib.retry(error_retry_times, function, error_sleep_time, *args,
**kwargs)
if not res:
raise exceptions.IOError("server IO error, will retry latter.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个抛一个异常没啥用了吧,直接返回一个error_code和error msg?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

前台会处理500,直接抛500
status code前台现在没有统一的机制来处理

Copy link
Member

@jacquesqiao jacquesqiao left a 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

@Superjomn Superjomn merged commit 19275c3 into PaddlePaddle:develop Jan 14, 2018
@Superjomn Superjomn deleted the enhance/server_revisit branch January 14, 2018 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants