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
72b86798
Commit
72b86798
authored
Feb 05, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
https://git.byitgroup.com/liyuan/byit-myth-job
into developer
parents
81bb6fe2
89a08b5a
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
4 deletions
+62
-4
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+11
-0
Node.java
...re/myth-admin-core/src/main/java/com/byit/model/Node.java
+9
-1
NodeVersion.java
...-admin-core/src/main/java/com/byit/model/NodeVersion.java
+9
-1
NodeVo.java
...th-admin-core/src/main/java/com/byit/model/vo/NodeVo.java
+6
-0
NodeMapper.xml
.../myth-admin-core/src/main/resources/mapper/NodeMapper.xml
+11
-1
NodeVersionMapper.xml
...dmin-core/src/main/resources/mapper/NodeVersionMapper.xml
+11
-1
PluginNode.java
...mon/src/main/java/com/byit/job/dto/plugin/PluginNode.java
+5
-0
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
72b86798
...
...
@@ -250,6 +250,12 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
else
{
node
.
setRemainingCount
(-
1
);
}
//判断是否在上级成功是才执行下级作业
if
(
null
!=
((
PluginNode
)
pluginNode
).
getSuperSuccessRun
()){
node
.
setSuperSuccessRun
(((
PluginNode
)
pluginNode
).
getSuperSuccessRun
());
}
else
{
node
.
setSuperSuccessRun
(
"0"
);
}
node
.
setIsVirtual
(
NodePropertyEnum
.
ISNOT_VIRTUAL
.
getCode
());
}
}
...
...
@@ -453,6 +459,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteFlow
(
String
flowName
,
String
workspaceName
)
{
log
.
info
(
"删除工作空间【{}】---工作流【{}】调度"
,
workspaceName
,
flowName
);
Workspace
workspace
=
workspaceMapper
.
getByName
(
workspaceName
);
...
...
@@ -496,6 +503,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
start
(
String
flowName
,
String
workspaceName
)
throws
ParseException
{
log
.
info
(
"开始工作空间【{}】---工作流【{}】调度"
,
workspaceName
,
flowName
);
Workspace
workspace
=
workspaceMapper
.
getByName
(
workspaceName
);
...
...
@@ -509,6 +517,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
repealSchedule
(
String
flowName
,
String
workspaceName
)
throws
ParseException
{
log
.
info
(
"撤销工作空间【{}】---工作流【{}】调度"
,
workspaceName
,
flowName
);
Workspace
workspace
=
workspaceMapper
.
getByName
(
workspaceName
);
...
...
@@ -563,6 +572,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
String
stopSchedule
(
String
flowName
,
String
workspaceName
)
{
log
.
info
(
"停止工作空间【{}】---工作流【{}】调度"
,
workspaceName
,
flowName
);
Workspace
workspace
=
workspaceMapper
.
getByName
(
workspaceName
);
...
...
@@ -584,6 +594,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
reStartSchedule
(
String
runIds
)
{
ValidationUtil
.
dataNotBank
(
runIds
,
"运行id不允许为空!"
);
List
<
String
>
runIdList
=
Arrays
.
asList
(
runIds
.
split
(
","
));
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/Node.java
View file @
72b86798
...
...
@@ -2,9 +2,10 @@ package com.byit.model;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
*
...
...
@@ -205,6 +206,12 @@ public class Node implements Serializable {
private
String
runSource
;
/**
* 是否上级运行成功时运行(0 是 1 否)
*/
@ApiModelProperty
(
"是否上级运行成功时运行(0 是 1 否)"
)
private
String
superSuccessRun
;
/**
*/
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/NodeVersion.java
View file @
72b86798
...
...
@@ -2,9 +2,10 @@ package com.byit.model;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
*
...
...
@@ -217,6 +218,12 @@ public class NodeVersion implements Serializable {
private
String
runSource
;
/**
* 是否上级运行成功时运行(0 是 1 否)
*/
@ApiModelProperty
(
"是否上级运行成功时运行(0 是 1 否)"
)
private
String
superSuccessRun
;
/**
*/
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
byit-myth-core/myth-admin-core/src/main/java/com/byit/model/vo/NodeVo.java
View file @
72b86798
...
...
@@ -212,6 +212,12 @@ public class NodeVo implements Serializable {
@ApiModelProperty
(
"依赖节点"
)
private
List
<
Integer
>
dependNodeId
;
/**
* 是否上级运行成功时运行(0 是 1 否)
*/
@ApiModelProperty
(
"是否上级运行成功时运行(0 是 1 否)"
)
private
String
superSuccessRun
;
/**
*/
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/NodeMapper.xml
View file @
72b86798
...
...
@@ -34,6 +34,7 @@
<result
column=
"version_name"
jdbcType=
"VARCHAR"
property=
"versionName"
/>
<result
column=
"on_fork"
jdbcType=
"CHAR"
property=
"onFork"
/>
<result
column=
"run_command"
jdbcType=
"VARCHAR"
property=
"runCommand"
/>
<result
column=
"super_success_run"
jdbcType=
"CHAR"
property=
"superSuccessRun"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.byit.model.Node"
>
<!-- generated @mbg.generated date: 2019-12-31 -->
...
...
@@ -45,7 +46,7 @@
job_type, handler_name, node_cron, node_desc, node_name, map_flow_id, node_timeout,
is_virtual, plugin_urls, priority, remaining_count, repeat_count, failed_retry_interval,
routing_strategy, run_param, run_source_desc, script_urls, source_principal, source_update_time,
trigger_next_time, author, add_time, version_name, on_fork, run_command
trigger_next_time, author, add_time, version_name, on_fork, run_command
, super_success_run
</sql>
<sql
id=
"Blob_Column_List"
>
...
...
@@ -230,6 +231,9 @@
<if
test=
"runSource != null"
>
run_source,
</if>
<if
test=
"superSuccessRun != null"
>
super_success_run,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"nodeId != null"
>
...
...
@@ -328,6 +332,9 @@
<if
test=
"runSource != null"
>
#{runSource,jdbcType=LONGVARCHAR},
</if>
<if
test=
"superSuccessRun != null"
>
#{superSuccessRun,jdbcType=CHAR},
</if>
</trim>
</insert>
...
...
@@ -437,6 +444,9 @@
<if
test=
"runSource != null"
>
run_source = #{runSource,jdbcType=LONGVARCHAR},
</if>
<if
test=
"superSuccessRun != null"
>
super_success_run = #{superSuccessRun,jdbcType=CHAR},
</if>
</set>
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/NodeVersionMapper.xml
View file @
72b86798
...
...
@@ -36,6 +36,7 @@
<result
column=
"version_name"
jdbcType=
"VARCHAR"
property=
"versionName"
/>
<result
column=
"on_fork"
jdbcType=
"CHAR"
property=
"onFork"
/>
<result
column=
"run_command"
jdbcType=
"VARCHAR"
property=
"runCommand"
/>
<result
column=
"super_success_run"
jdbcType=
"CHAR"
property=
"superSuccessRun"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.byit.model.NodeVersion"
>
<!-- generated @mbg.generated date: 2019-12-31 -->
...
...
@@ -48,7 +49,7 @@
map_flow_id, node_timeout, is_virtual, plugin_urls, priority, remove_mark, repeat_count,
failed_retry_interval, routing_strategy, run_param, run_source_desc, script_urls,
source_principal, source_update_time, version_mark, author, add_time, version_name,
on_fork, run_command
on_fork, run_command
, super_success_run
</sql>
<sql
id=
"Blob_Column_List"
>
<!-- generated @mbg.generated date: 2019-12-31 -->
...
...
@@ -178,6 +179,9 @@
<if
test=
"runSource != null"
>
run_source,
</if>
<if
test=
"superSuccessRun != null"
>
super_success_run,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"nodeVersionId != null"
>
...
...
@@ -282,6 +286,9 @@
<if
test=
"runSource != null"
>
#{runSource,jdbcType=LONGVARCHAR},
</if>
<if
test=
"superSuccessRun != null"
>
#{superSuccessRun,jdbcType=CHAR},
</if>
</trim>
</insert>
...
...
@@ -394,6 +401,9 @@
<if
test=
"runSource != null"
>
run_source = #{runSource,jdbcType=LONGVARCHAR},
</if>
<if
test=
"superSuccessRun != null"
>
super_success_run = #{superSuccessRun,jdbcType=CHAR},
</if>
</set>
where node_version_id = #{nodeVersionId,jdbcType=INTEGER}
</update>
...
...
byit-myth-core/myth-core-common/src/main/java/com/byit/job/dto/plugin/PluginNode.java
View file @
72b86798
...
...
@@ -47,6 +47,11 @@ public class PluginNode extends PluginBaseNode implements Serializable {
private
String
sourcePrincipal
;
/**
* 是否上级运行成功时运行(0 是 1 否)
*/
private
String
superSuccessRun
;
/**
* 节点的配置
*/
private
PluginNodeConfig
config
;
...
...
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