Skip to content

Commit

Permalink
Merge pull request #31 from WeiYe-Jing/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
waterWang authored Jul 12, 2020
2 parents 1dbe8a8 + 8448848 commit 9037c4d
Show file tree
Hide file tree
Showing 28 changed files with 527 additions and 584 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
/datax-executor/target/
/datax-executor/datax-executor.iml
/datax-core/datax-core.iml
/datax-core/target/
/datax-admin/datax-admin.iml
/datax-admin/target/
/.idea/
/datax-admin/.idea/
/datax-registry/datax-registry.iml
/datax-registry/target/
/datax-rpc/datax-rpc.iml
/datax-rpc/target/
/datax-all.iml
/logs/
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,7 @@ public void destroy() {
TriggerCallbackThread.getInstance().toStop();

// destory ProcessCallbackThread
try {
ProcessCallbackThread.getInstance().toStop();
} catch (InterruptedException e) {
e.printStackTrace();
}

ProcessCallbackThread.getInstance().toStop();
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private void initJobHandlerRepository(ApplicationContext applicationContext) {

@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
applicationContext = applicationContext;
this.applicationContext = applicationContext;
}

public static ApplicationContext getApplicationContext() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,26 @@ public void start() {

}

public void toStop() throws InterruptedException {
public void toStop() {
toStop = true;
// stop callback, interrupt and wait
// support empty admin address
if (processCallbackThread != null) {
if (processCallbackThread != null) { // support empty admin address
processCallbackThread.interrupt();
processCallbackThread.join();
try {
processCallbackThread.join();
} catch (InterruptedException e) {
logger.error(e.getMessage(), e);
}
}

// stop retry, interrupt and wait
if (processRetryCallbackThread != null) {
processRetryCallbackThread.interrupt();
processRetryCallbackThread.join();
try {
processRetryCallbackThread.join();
} catch (InterruptedException e) {
logger.error(e.getMessage(), e);
}
}
}

Expand Down
Loading

0 comments on commit 9037c4d

Please sign in to comment.