Skip to content

Commit b7a84a3

Browse files
committed
[Bug] fix duration column in JobList & JobDetail
1 parent 0383b36 commit b7a84a3

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/application/impl/FlinkApplicationManageServiceImpl.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,15 +276,16 @@ public IPage<FlinkApplication> page(FlinkApplication appParam, RestRequest reque
276276
.peek(
277277
record -> {
278278
// status of flink job on kubernetes mode had been automatically persisted
279-
// to db
280-
// in time.
279+
// to db in time.
281280
if (record.isKubernetesModeJob()) {
282-
// set duration
283281
String restUrl = k8SFlinkTrackMonitor
284282
.getRemoteRestUrl(k8sWatcherWrapper.toTrackId(record));
285283
record.setFlinkRestUrl(restUrl);
286-
setAppDurationIfNeeded(record, now);
287284
}
285+
286+
// set duration
287+
setAppDurationIfNeeded(record, now);
288+
288289
if (pipeStates.containsKey(record.getId())) {
289290
record.setBuildStatus(pipeStates.get(record.getId()).getCode());
290291
}
@@ -763,12 +764,12 @@ public FlinkApplication getApp(Long id) {
763764
if (application.isKubernetesModeJob()) {
764765
String restUrl = k8SFlinkTrackMonitor.getRemoteRestUrl(k8sWatcherWrapper.toTrackId(application));
765766
application.setFlinkRestUrl(restUrl);
766-
767-
// set duration
768-
long now = System.currentTimeMillis();
769-
setAppDurationIfNeeded(application, now);
770767
}
771768

769+
// set duration
770+
long now = System.currentTimeMillis();
771+
setAppDurationIfNeeded(application, now);
772+
772773
application.setYarnQueueByHotParams();
773774

774775
return application;

0 commit comments

Comments
 (0)