abhishekmjain commented on code in PR #4097:
URL: https://github.com/apache/gobblin/pull/4097#discussion_r1956067897


##########
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/joblauncher/GobblinTemporalJobLauncher.java:
##########
@@ -188,4 +191,17 @@ protected void removeTasksFromCurrentJob(List<String> 
workUnitIdsToRemove) {
   protected void addTasksToCurrentJob(List<WorkUnit> workUnitsToAdd) {
     log.warn("NOT IMPLEMENTED: Temporal addTasksToCurrentJob");
   }
+
+  @Override
+  public void close() throws IOException {
+    try {
+      // Calling cancel before calling close on serviceStubs as it will 
shutdown the service which is required during cancellation.
+      cancelJob(jobListener);
+    } catch (Exception e) {
+      log.error("Exception occurred while cancelling job", e);
+    } finally {
+      managedWorkflowServiceStubs.close();

Review Comment:
   no, `managedWorkflowServiceStubs.close()` cannot throw an exception since 
we're catching and logging all exceptions there.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to