Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
Overview
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
liyuan
byit-myth-job
Commits
04cbf0e2
Commit
04cbf0e2
authored
Jan 26, 2021
by
huangfu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改内存溢出的BUG
parent
7102f04a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
ApiFlowOperatingServiceImpl.java
...va/com/byit/service/impl/ApiFlowOperatingServiceImpl.java
+9
-8
ExceptionHandle.java
...re/src/main/java/com/byit/web/advice/ExceptionHandle.java
+2
-1
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowOperatingServiceImpl.java
View file @
04cbf0e2
...
@@ -141,7 +141,7 @@ public class ApiFlowOperatingServiceImpl implements ApiFlowOperatingService {
...
@@ -141,7 +141,7 @@ public class ApiFlowOperatingServiceImpl implements ApiFlowOperatingService {
}
}
if
(
CollectionUtil
.
isNotEmpty
(
nodeRelyDtoSet
))
{
if
(
CollectionUtil
.
isNotEmpty
(
nodeRelyDtoSet
))
{
//构建等待队列
//构建等待队列
List
<
WaitingRecord
>
waitingRecords
=
buildWaitingRecordList
(
flowByName
,
nodeRelyDtoSet
.
size
(),
operator
,
repairTimeList
,
newPublicParam
);
List
<
WaitingRecord
>
waitingRecords
=
buildWaitingRecordList
(
flowByName
,
nodeRelyDtoSet
.
size
(),
operator
,
repairTimeList
,
JSON
.
toJSONString
(
newPublicParam
)
);
waitingRecords
.
forEach
(
waitingRecordMapper:
:
insertSelective
);
waitingRecords
.
forEach
(
waitingRecordMapper:
:
insertSelective
);
List
<
RunRecording
>
runRecordings
=
buildRunRecordingList
(
waitingRecords
);
List
<
RunRecording
>
runRecordings
=
buildRunRecordingList
(
waitingRecords
);
List
<
WaitingTask
>
waitingTaskList
=
buildWaitingTaskResult
(
waitingRecords
,
nodeRelyDtoSet
,
specialJobParam
.
getPublicParam
(),
timeFormatName
,
nowTimeFormatName
);
List
<
WaitingTask
>
waitingTaskList
=
buildWaitingTaskResult
(
waitingRecords
,
nodeRelyDtoSet
,
specialJobParam
.
getPublicParam
(),
timeFormatName
,
nowTimeFormatName
);
...
@@ -287,20 +287,21 @@ public class ApiFlowOperatingServiceImpl implements ApiFlowOperatingService {
...
@@ -287,20 +287,21 @@ public class ApiFlowOperatingServiceImpl implements ApiFlowOperatingService {
* @param repairTimeList 补时间
* @param repairTimeList 补时间
* @return 等待队列集合
* @return 等待队列集合
*/
*/
private
List
<
WaitingRecord
>
buildWaitingRecordList
(
Flow
flow
,
Integer
nodeCount
,
String
operator
,
List
<
RepairTimeParam
>
repairTimeList
,
Map
<
String
,
String
>
publicParam
)
{
private
List
<
WaitingRecord
>
buildWaitingRecordList
(
Flow
flow
,
Integer
nodeCount
,
String
operator
,
List
<
RepairTimeParam
>
repairTimeList
,
String
publicParam
)
{
//查看当前排队的工作流最大排队序号
//查看当前排队的工作流最大排队序号
Integer
order
=
waitingRecordMapper
.
findOrderByFlowId
(
flow
.
getFlowId
());
Integer
order
=
waitingRecordMapper
.
findOrderByFlowId
(
flow
.
getFlowId
());
if
(
order
==
null
)
{
if
(
order
==
null
)
{
order
=
0
;
order
=
0
;
}
}
//传递过来的公共参数格式化
//传递过来的公共参数格式化
if
(
CollectionUtil
.
isEmpty
(
publicParam
)){
Map
<
String
,
String
>
publicMap
=
JSON
.
parseObject
(
publicParam
,
Map
.
class
);
publicParam
=
new
HashMap
<>(
8
);
if
(
CollectionUtil
.
isEmpty
(
publicMap
)){
publicMap
=
new
HashMap
<>(
8
);
}
}
List
<
WaitingRecord
>
waitingRecords
=
new
ArrayList
<>(
2
);
List
<
WaitingRecord
>
waitingRecords
=
new
ArrayList
<>(
2
);
for
(
RepairTimeParam
repairTimeParam
:
repairTimeList
)
{
for
(
RepairTimeParam
repairTimeParam
:
repairTimeList
)
{
public
Param
.
put
(
PlaceholderEnum
.
DATE_PLACEHOLDER
.
getName
(),
repairTimeParam
.
getRepairTime
());
public
Map
.
put
(
PlaceholderEnum
.
DATE_PLACEHOLDER
.
getName
(),
repairTimeParam
.
getRepairTime
());
public
Param
.
put
(
PlaceholderEnum
.
NOW_DATE_PLACEHOLDER
.
getName
(),
repairTimeParam
.
getRepairTime
());
public
Map
.
put
(
PlaceholderEnum
.
NOW_DATE_PLACEHOLDER
.
getName
(),
repairTimeParam
.
getRepairTime
());
String
repeatTime
=
repairTimeParam
.
getRepairTime
();
String
repeatTime
=
repairTimeParam
.
getRepairTime
();
String
timeTypeName
=
repairTimeParam
.
getTimeTypeName
();
String
timeTypeName
=
repairTimeParam
.
getTimeTypeName
();
WaitingRecord
waitingRecord
=
new
WaitingRecord
();
WaitingRecord
waitingRecord
=
new
WaitingRecord
();
...
@@ -314,11 +315,11 @@ public class ApiFlowOperatingServiceImpl implements ApiFlowOperatingService {
...
@@ -314,11 +315,11 @@ public class ApiFlowOperatingServiceImpl implements ApiFlowOperatingService {
if
(
flowPublicParamMap
==
null
){
if
(
flowPublicParamMap
==
null
){
flowPublicParamMap
=
new
HashMap
<>();
flowPublicParamMap
=
new
HashMap
<>();
}
}
flowPublicParamMap
.
putAll
(
public
Param
);
flowPublicParamMap
.
putAll
(
public
Map
);
flowExtendedConfiguration
.
setPublicParam
(
JSON
.
toJSONString
(
flowPublicParamMap
));
flowExtendedConfiguration
.
setPublicParam
(
JSON
.
toJSONString
(
flowPublicParamMap
));
}
else
{
}
else
{
flowExtendedConfiguration
=
new
FlowExtendedConfiguration
();
flowExtendedConfiguration
=
new
FlowExtendedConfiguration
();
flowExtendedConfiguration
.
setPublicParam
(
JSON
.
toJSONString
(
public
Param
));
flowExtendedConfiguration
.
setPublicParam
(
JSON
.
toJSONString
(
public
Map
));
}
}
waitingRecord
.
setExtendedConfiguration
(
JSON
.
toJSONString
(
flowExtendedConfiguration
));
waitingRecord
.
setExtendedConfiguration
(
JSON
.
toJSONString
(
flowExtendedConfiguration
));
waitingRecord
.
setFlowVersionName
(
flow
.
getVersionName
());
waitingRecord
.
setFlowVersionName
(
flow
.
getVersionName
());
...
...
byit-myth-core/myth-web-core/src/main/java/com/byit/web/advice/ExceptionHandle.java
View file @
04cbf0e2
...
@@ -33,7 +33,8 @@ public class ExceptionHandle {
...
@@ -33,7 +33,8 @@ public class ExceptionHandle {
return
ResponseResult
.
error
(
TransferResultEnum
.
ERROR
.
getCode
(),
e
.
getMessage
());
return
ResponseResult
.
error
(
TransferResultEnum
.
ERROR
.
getCode
(),
e
.
getMessage
());
}
}
log
.
error
(
MythLogUtils
.
getMessage
(
e
));
log
.
error
(
MythLogUtils
.
getMessage
(
e
));
return
ResponseResult
.
error
(
"调度中心走神了,请稍后再试~~!"
);
//return ResponseResult.error("调度中心走神了,请稍后再试~~!");
return
ResponseResult
.
error
(
MythLogUtils
.
getMessage
(
e
));
}
}
/**
/**
...
...
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