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
cae01d3b
Unverified
Commit
cae01d3b
authored
Apr 10, 2024
by
gaoyan
Committed by
GitHub
Apr 10, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bug]Fix the issue that the status is unknown after the batch task is Finish (#3373)
Co-authored-by:
gaoyan1998
<
gaoyan1998@users.noreply.github.com
>
parent
b242eac4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
JobRefreshHandler.java
...rc/main/java/org/dinky/job/handler/JobRefreshHandler.java
+14
-0
No files found.
dinky-admin/src/main/java/org/dinky/job/handler/JobRefreshHandler.java
View file @
cae01d3b
...
@@ -167,9 +167,23 @@ public class JobRefreshHandler {
...
@@ -167,9 +167,23 @@ public class JobRefreshHandler {
if
(!
oldStatus
.
equals
(
jobInstance
.
getStatus
())
||
isDone
||
needSave
)
{
if
(!
oldStatus
.
equals
(
jobInstance
.
getStatus
())
||
isDone
||
needSave
)
{
log
.
debug
(
"Dump JobInfo to database: {}->{}"
,
jobInstance
.
getId
(),
jobInstance
.
getName
());
log
.
debug
(
"Dump JobInfo to database: {}->{}"
,
jobInstance
.
getId
(),
jobInstance
.
getName
());
if
(
jobInstance
.
getStatus
().
equals
(
JobStatus
.
UNKNOWN
.
getValue
())
||
jobInstance
.
getStatus
().
equals
(
JobStatus
.
RECONNECTING
.
getValue
()))
{
JobInstance
fromDb
=
jobInstanceService
.
getById
(
jobInstance
.
getId
());
// If the job status is unknown and the job status in the database is not done, update the job status
// just prevent the task from being mistakenly updated to UNKNOWN
if
(
JobStatus
.
valueOf
(
fromDb
.
getStatus
()).
isDone
())
{
// if status is RECONNECTING, ignore it
isDone
=
true
;
}
else
{
jobInstanceService
.
updateById
(
jobInstance
);
jobHistoryService
.
updateById
(
jobInfoDetail
.
getJobDataDto
().
toJobHistory
());
}
}
else
{
jobInstanceService
.
updateById
(
jobInstance
);
jobInstanceService
.
updateById
(
jobInstance
);
jobHistoryService
.
updateById
(
jobInfoDetail
.
getJobDataDto
().
toJobHistory
());
jobHistoryService
.
updateById
(
jobInfoDetail
.
getJobDataDto
().
toJobHistory
());
}
}
}
if
(
isDone
)
{
if
(
isDone
)
{
try
{
try
{
...
...
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