Skip to content

Commit 9024908

Browse files
committed
[Bug] fix duration column in JobList & JobDetail
1 parent 203beb8 commit 9024908

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
@@ -282,15 +282,16 @@ public IPage<FlinkApplication> page(FlinkApplication appParam, RestRequest reque
282282
.peek(
283283
record -> {
284284
// status of flink job on kubernetes mode had been automatically persisted
285-
// to db
286-
// in time.
285+
// to db in time.
287286
if (record.isKubernetesModeJob()) {
288-
// set duration
289287
String restUrl = k8SFlinkTrackMonitor
290288
.getRemoteRestUrl(k8sWatcherWrapper.toTrackId(record));
291289
record.setFlinkRestUrl(restUrl);
292-
setAppDurationIfNeeded(record, now);
293290
}
291+
292+
// set duration
293+
setAppDurationIfNeeded(record, now);
294+
294295
if (pipeStates.containsKey(record.getId())) {
295296
record.setBuildStatus(pipeStates.get(record.getId()).getCode());
296297
}
@@ -776,12 +777,12 @@ public FlinkApplication getApp(Long id) {
776777
if (application.isKubernetesModeJob()) {
777778
String restUrl = k8SFlinkTrackMonitor.getRemoteRestUrl(k8sWatcherWrapper.toTrackId(application));
778779
application.setFlinkRestUrl(restUrl);
779-
780-
// set duration
781-
long now = System.currentTimeMillis();
782-
setAppDurationIfNeeded(application, now);
783780
}
784781

782+
// set duration
783+
long now = System.currentTimeMillis();
784+
setAppDurationIfNeeded(application, now);
785+
785786
application.setYarnQueueByHotParams();
786787

787788
return application;

0 commit comments

Comments
 (0)