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

(fix)wrap schedule in a try catch in case of too many scheduled jobs which… #236

Merged
merged 2 commits into from
Nov 8, 2018

Conversation

thomaszurkan-optimizely
Copy link
Contributor

… throws an exception

wrap the job scheduler schedule in a try catch. Customer is experiencing difficulty starting in the background and trying to schedule another background update causes a Illegal State Exception.

This is not necessarily the SDK's fault but the exception should not stop the app. So, we are wrapping the call with a try catch.

#234

}
}
catch (Exception e) {
logger.error("Problem scheduling job ", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably provide more context on this error, like the fact that the datafile sync scheduling failed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the component name which would in this case be DatafileService

Copy link
Contributor

@mikeproeng37 mikeproeng37 left a comment

Choose a reason for hiding this comment

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

lgtm

@thomaszurkan-optimizely thomaszurkan-optimizely merged commit 6fb9084 into master Nov 8, 2018
@thomaszurkan-optimizely thomaszurkan-optimizely deleted the catchExcpFromScheduling branch November 8, 2018 20:39
@thomaszurkan-optimizely thomaszurkan-optimizely restored the catchExcpFromScheduling branch November 8, 2018 20:40
thomaszurkan-optimizely added a commit that referenced this pull request Nov 8, 2018
…which… (#236)

* wrap schedule in a try catch in case of too many scheduled jobs which throws an exception

* added better logging and exception handling
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