Skip to content

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