Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
e5f21dbb
Unverified
Commit
e5f21dbb
authored
Jan 31, 2024
by
gaoyan
Committed by
GitHub
Jan 31, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Fix]Fix deletion task failed when the job instance does not exist (#3107)
Co-authored-by:
gaoyan1998
<
gaoyan1998@users.noreply.github.com
>
parent
05d3f608
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
CatalogueServiceImpl.java
...ain/java/org/dinky/service/impl/CatalogueServiceImpl.java
+8
-5
JobInstanceServiceImpl.java
...n/java/org/dinky/service/impl/JobInstanceServiceImpl.java
+3
-1
No files found.
dinky-admin/src/main/java/org/dinky/service/impl/CatalogueServiceImpl.java
View file @
e5f21dbb
...
...
@@ -31,6 +31,7 @@ import org.dinky.data.exception.BusException;
import
org.dinky.data.model.Catalogue
;
import
org.dinky.data.model.Metrics
;
import
org.dinky.data.model.Task
;
import
org.dinky.data.model.ext.JobInfoDetail
;
import
org.dinky.data.model.job.History
;
import
org.dinky.data.model.job.JobHistory
;
import
org.dinky.data.model.job.JobInstance
;
...
...
@@ -466,13 +467,15 @@ public class CatalogueServiceImpl extends SuperServiceImpl<CatalogueMapper, Cata
throw
new
BusException
(
Status
.
TASK_IS_PUBLISH_CANNOT_DELETE
);
}
if
(
task
.
getJobInstanceId
()
!=
null
)
{
// 获取前 先强制刷新一下, 避免获取任务信息状态不准确
jobInstanceService
.
refreshJobInfoDetail
(
task
.
getJobInstanceId
(),
true
);
// 获取当前 job instance
JobInstance
currentJobInstance
=
jobInstanceService
.
getById
(
task
.
getJobInstanceId
());
if
(
currentJobInstance
!=
null
&&
currentJobInstance
.
getStatus
().
equals
(
JobStatus
.
RUNNING
.
getValue
()))
{
throw
new
BusException
(
Status
.
TASK_IS_RUNNING_CANNOT_DELETE
);
if
(
currentJobInstance
!=
null
)
{
// 获取前 先强制刷新一下, 避免获取任务信息状态不准确
JobInfoDetail
jobInfoDetail
=
jobInstanceService
.
refreshJobInfoDetail
(
task
.
getJobInstanceId
(),
true
);
if
(
jobInfoDetail
.
getInstance
().
getStatus
().
equals
(
JobStatus
.
RUNNING
.
getValue
()))
{
throw
new
BusException
(
Status
.
TASK_IS_RUNNING_CANNOT_DELETE
);
}
}
}
}
...
...
dinky-admin/src/main/java/org/dinky/service/impl/JobInstanceServiceImpl.java
View file @
e5f21dbb
...
...
@@ -170,7 +170,9 @@ public class JobInstanceServiceImpl extends SuperServiceImpl<JobInstanceMapper,
if
(
Asserts
.
isNotNull
(
history
.
getClusterConfigurationId
()))
{
ClusterConfiguration
clusterConfig
=
clusterConfigurationService
.
getClusterConfigById
(
history
.
getClusterConfigurationId
());
jobInfoDetail
.
setClusterConfiguration
(
ClusterConfigurationDTO
.
fromBean
(
clusterConfig
));
if
(
clusterConfig
!=
null
)
{
jobInfoDetail
.
setClusterConfiguration
(
ClusterConfigurationDTO
.
fromBean
(
clusterConfig
));
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment