[ 
https://issues.apache.org/jira/browse/GOBBLIN-2210?focusedWorklogId=976473&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-976473
 ]

ASF GitHub Bot logged work on GOBBLIN-2210:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Jul/25 04:09
            Start Date: 28/Jul/25 04:09
    Worklog Time Spent: 10m 
      Work Description: abhishekmjain commented on code in PR #4119:
URL: https://github.com/apache/gobblin/pull/4119#discussion_r2234616990


##########
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:
   nit: Let's rename this to executeRunnableSafely to give an indication that 
we are calling run 





Issue Time Tracking
-------------------

            Worklog Id:     (was: 976473)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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: 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to