[
https://issues.apache.org/jira/browse/GOBBLIN-2210?focusedWorklogId=976517&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-976517
]
ASF GitHub Bot logged work on GOBBLIN-2210:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 28/Jul/25 08:59
Start Date: 28/Jul/25 08:59
Worklog Time Spent: 10m
Work Description: Blazer-007 commented on code in PR #4119:
URL: https://github.com/apache/gobblin/pull/4119#discussion_r2235436944
##########
gobblin-utility/src/main/java/org/apache/gobblin/util/ExecutorsUtils.java:
##########
@@ -162,6 +165,27 @@ public static Runnable loggingDecorator(Runnable runnable)
{
return new MDCPropagatingRunnable(runnable);
}
+
+ /**
+ * Wraps a {@link Runnable} task with exception handling to ensure that
+ * any thrown exception does not terminate the thread or scheduled executor.
+ * This is useful for long-running or recurring tasks where resilience is
critical.
+ *
+ * @param runnable the task to wrap
+ * @return a safe {@link Runnable} that logs and suppresses exceptions
+ */
+ public static Runnable safeRunnable(Runnable runnable) {
Review Comment:
It returns a new runnable by wrapping the given runnable run so the run will
actually be called when caller calls the run explicitly
Issue Time Tracking
-------------------
Worklog Id: (was: 976517)
Time Spent: 40m (was: 0.5h)
> Add exception handling in Temporal Heartbeat Runnable
> -----------------------------------------------------
>
> Key: GOBBLIN-2210
> URL: https://issues.apache.org/jira/browse/GOBBLIN-2210
> Project: Apache Gobblin
> Issue Type: Improvement
> Reporter: Vivek Rai
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)