You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/07/30 16:07:40 UTC

[shardingsphere-elasticjob] branch master updated: Fix LiteJob will create a shutdownhook thread every time as execute job (#1297) (#1298)

This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob.git


The following commit(s) were added to refs/heads/master by this push:
     new abe6f23  Fix LiteJob will create a shutdownhook thread every time as execute job (#1297) (#1298)
abe6f23 is described below

commit abe6f23245c15d13d079e9d28bcdf308b64614fd
Author: Tboy <gu...@immomo.com>
AuthorDate: Fri Jul 31 00:06:02 2020 +0800

    Fix LiteJob will create a shutdownhook thread every time as execute job (#1297) (#1298)
---
 .../apache/shardingsphere/elasticjob/executor/ElasticJobExecutor.java   | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/elasticjob-executor/elasticjob-executor-kernel/src/main/java/org/apache/shardingsphere/elasticjob/executor/ElasticJobExecutor.java b/elasticjob-executor/elasticjob-executor-kernel/src/main/java/org/apache/shardingsphere/elasticjob/executor/ElasticJobExecutor.java
index 31b565f..45b0f54 100644
--- a/elasticjob-executor/elasticjob-executor-kernel/src/main/java/org/apache/shardingsphere/elasticjob/executor/ElasticJobExecutor.java
+++ b/elasticjob-executor/elasticjob-executor-kernel/src/main/java/org/apache/shardingsphere/elasticjob/executor/ElasticJobExecutor.java
@@ -113,6 +113,8 @@ public final class ElasticJobExecutor {
         } catch (final Throwable cause) {
             //CHECKSTYLE:ON
             jobErrorHandler.handleException(jobConfig.getJobName(), cause);
+        } finally {
+            executorService.shutdown();
         }
     }