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

Improve the error handling capabilities of job service #4910

Merged
merged 2 commits into from
May 10, 2018

Conversation

steven-zou
Copy link
Contributor

Return none zero code when job service exit with an error
Add retry when getting configs from admin server failed

replace fmt.Println/logger.Errorf with logger.Fatal(f)
logger.Errorf("Job context initialization error: %s\n", err.Error())
if counter < maxRetryTimes {
backoff := (int)(math.Pow(2, (float64)(counter))) + 2*counter + 5
time.Sleep(time.Duration(backoff) * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a log saying "retry in xxx seconds"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

Copy link
Contributor

@reasonerjt reasonerjt left a comment

Choose a reason for hiding this comment

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

see comment

@steven-zou steven-zou force-pushed the fix_none_zero_issue branch from eaa3eea to 4db7080 Compare May 10, 2018 07:27
@coveralls
Copy link

coveralls commented May 10, 2018

Coverage Status

Coverage decreased (-0.03%) to 64.501% when pulling 4db7080 on fix_none_zero_issue into b4b148e on master.

@reasonerjt reasonerjt merged commit cf79e9e into master May 10, 2018
@steven-zou steven-zou deleted the fix_none_zero_issue branch May 10, 2018 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants