ruanwenjun commented on code in PR #16461:
URL:
https://github.com/apache/dolphinscheduler/pull/16461#discussion_r1717792832
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/execute/AsyncTaskExecutionContext.java:
##########
@@ -59,19 +59,17 @@ public AsyncTaskExecutionContext(@NonNull
TaskExecutionContext taskExecutionCont
this.executeInterval =
Math.max(asyncTaskExecuteFunction.getAsyncTaskStateCheckInterval().toMillis(),
1000L);
}
- public void refreshStartTime() {
- if (executeTimes == 0) {
+ public synchronized void refreshStartTime() {
+ if (executeTimes != 0) {
// The first time doesn't have delay
- executeTimes++;
- } else {
currentStartTime = System.currentTimeMillis();
}
+ executeTimes++;
Review Comment:
yes, it's great, we can add this in task metrics.
--
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]