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
b242eac4
Unverified
Commit
b242eac4
authored
Apr 10, 2024
by
gaoyan
Committed by
GitHub
Apr 10, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Optimization]Fix the issue that clusters are not automatically deleted in app mode (#3374)
Co-authored-by:
gaoyan1998
<
gaoyan1998@users.noreply.github.com
>
parent
be747e50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
FlinkAppUtil.java
...p-base/src/main/java/org/dinky/app/util/FlinkAppUtil.java
+9
-5
No files found.
dinky-app/dinky-app-base/src/main/java/org/dinky/app/util/FlinkAppUtil.java
View file @
b242eac4
...
@@ -106,10 +106,9 @@ public class FlinkAppUtil {
...
@@ -106,10 +106,9 @@ public class FlinkAppUtil {
*/
*/
private
static
void
sendHook
(
int
taskId
,
String
jobId
,
int
reTryCount
)
{
private
static
void
sendHook
(
int
taskId
,
String
jobId
,
int
reTryCount
)
{
String
dinkyAddr
=
SystemConfiguration
.
getInstances
().
getDinkyAddr
().
getValue
();
String
dinkyAddr
=
SystemConfiguration
.
getInstances
().
getDinkyAddr
().
getValue
();
String
url
=
StrFormatter
.
format
(
"{}/api/jobInstance/hookJobDone?taskId={}&jobId={}"
,
dinkyAddr
,
taskId
,
jobId
);
try
{
try
{
String
url
=
String
resultStr
=
HttpUtil
.
get
(
url
,
5000
);
StrFormatter
.
format
(
"{}/api/jobInstance/hookJobDone?taskId={}&jobId={}"
,
dinkyAddr
,
taskId
,
jobId
);
String
resultStr
=
HttpUtil
.
get
(
url
);
// TODO 这里应该使用Result实体类,但是Result.class不在comm里,迁移改动太大,暂时不搞
// TODO 这里应该使用Result实体类,但是Result.class不在comm里,迁移改动太大,暂时不搞
String
code
=
JsonUtils
.
parseObject
(
resultStr
).
get
(
"code"
).
toString
();
String
code
=
JsonUtils
.
parseObject
(
resultStr
).
get
(
"code"
).
toString
();
if
(!
"0"
.
equals
(
code
))
{
if
(!
"0"
.
equals
(
code
))
{
...
@@ -117,8 +116,13 @@ public class FlinkAppUtil {
...
@@ -117,8 +116,13 @@ public class FlinkAppUtil {
StrFormatter
.
format
(
"Send Hook Job Done result failed,url:{},err:{} "
,
url
,
resultStr
));
StrFormatter
.
format
(
"Send Hook Job Done result failed,url:{},err:{} "
,
url
,
resultStr
));
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
reTryCount
<
30
)
{
if
(
reTryCount
<
10
)
{
log
.
error
(
"send hook failed,retry later taskId:{},jobId:{},{}"
,
taskId
,
jobId
,
e
.
getMessage
());
log
.
error
(
"send hook failed,retry later,url:{}, taskId:{},jobId:{},{}"
,
url
,
taskId
,
jobId
,
e
.
getMessage
());
try
{
try
{
Thread
.
sleep
(
1000
);
Thread
.
sleep
(
1000
);
}
catch
(
InterruptedException
ex
)
{
}
catch
(
InterruptedException
ex
)
{
...
...
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