LourierL commented on code in PR #17523:
URL:
https://github.com/apache/dolphinscheduler/pull/17523#discussion_r2361991157
##########
dolphinscheduler-task-executor/src/main/java/org/apache/dolphinscheduler/task/executor/container/AbstractTaskExecutorContainer.java:
##########
@@ -145,4 +149,26 @@
}
}
+ /**
+ * Delete task exec Directory if set development.state=false in
common.properties explicit
+ * otherwise keep it for debug reason.
+ */
+ private void deleteExecPathIfProduction(ITaskExecutor taskExecutor) {
+ boolean isDev = PropertyUtils.getBoolean(Constants.DEVELOPMENT_STATE,
true);
+ if (!isDev) {
+ try {
+ final TaskExecutionContext ctx =
taskExecutor.getTaskExecutionContext();
+ final String execPath = (ctx != null ? ctx.getExecutePath() :
"");
+ if (!"".equals(execPath)) {
Review Comment:
ok, I will use StringUtils.isNotEmpty() api to replace the code here.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]