vanilla111 commented on a change in pull request #3427:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/3427#discussion_r470934977



##########
File path: 
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/runner/TaskExecuteThread.java
##########
@@ -256,4 +275,59 @@ private void downloadResource(String execLocalPath,
             }
         }
     }
+
+    /**
+     * delay execution if needed
+     */
+    private void delayExecutionIfNeeded() {
+        long remainTime = 
DateUtils.getRemainTime(taskExecutionContext.getFirstSubmitTime(),
+                taskExecutionContext.getDelayTime() * 60L);
+        logger.info("delay execution time: {} s", remainTime < 0 ? 0 : 
remainTime);
+        if (remainTime > 0) {
+            try {
+                Thread.sleep(remainTime * Constants.SLEEP_TIME_MILLIS);

Review comment:
       This is indeed a good suggestion, and I have a preliminary idea for its 
realization. I will start to implement it immediately after I complete another 
feature.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to