Skip to content
This repository has been archived by the owner on Oct 3, 2018. It is now read-only.

Log errors from ScheduledThreadPool executors. #3

Open
mansu opened this issue Oct 26, 2017 · 0 comments
Open

Log errors from ScheduledThreadPool executors. #3

mansu opened this issue Oct 26, 2017 · 0 comments

Comments

@mansu
Copy link
Contributor

mansu commented Oct 26, 2017

Currently, we schedule tasks using a ScheduledThreadPoolExector. When using this one has to be careful wrap all Runnable.run() methods in a try/catch block. If we fail to do that the repeating task fails to run after the first failure.

A smarter way is to use a loggingScheduledPoolExecutor like this one: https://github.com/apache/aurora/blob/c85bffdd6f68312261697eee868d57069adda434/src/main/java/org/apache/aurora/scheduler/base/AsyncUtil.java

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant