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
4b395198
Commit
4b395198
authored
Apr 01, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作流运行实例增加开始时间和结束时间
parent
dd74a46b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
ClosingExampleThreadRunHelper.java
...com/byit/thread/helper/ClosingExampleThreadRunHelper.java
+2
-0
TaskThreadRunHelper.java
...main/java/com/byit/thread/helper/TaskThreadRunHelper.java
+2
-0
RegistryServiceRegistry.java
...a/com/byit/rpc/registry/impl/RegistryServiceRegistry.java
+14
-0
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/helper/ClosingExampleThreadRunHelper.java
View file @
4b395198
...
...
@@ -17,6 +17,7 @@ import org.springframework.context.ApplicationEventPublisherAware;
import
org.springframework.stereotype.Component
;
import
javax.sql.DataSource
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -67,6 +68,7 @@ public class ClosingExampleThreadRunHelper extends BaseThreadRunHelper implement
runRecording
.
setFlowRunResult
(
runCode
);
log
.
debug
(
"----------------扫描到有完结的运行实例{},{}-------------"
,
runCode
,
RunRecordingEnum
.
FLOW_STATUS_IS_END
.
getCode
());
runRecording
.
setFlowStatus
(
RunRecordingEnum
.
FLOW_STATUS_IS_END
.
getCode
());
runRecording
.
setEndTime
(
new
Date
());
runRecordingService
.
updateRunRecordingById
(
runRecording
);
applicationEventPublisher
.
publishEvent
(
new
EndFlowEvent
(
this
,
flowId
));
}
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/helper/TaskThreadRunHelper.java
View file @
4b395198
...
...
@@ -24,6 +24,7 @@ import org.springframework.stereotype.Component;
import
javax.sql.DataSource
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -190,6 +191,7 @@ public class TaskThreadRunHelper extends BaseThreadRunHelper {
Integer
flowId
=
thisJobTask
.
getFlowId
();
RunRecording
runRecordingByFlowIdAndRunId
=
runRecordingService
.
findRunRecordingByFlowIdAndRunId
(
flowId
,
runId
);
runRecordingByFlowIdAndRunId
.
setFlowStatus
(
FlowPropertyEnum
.
FLOW_RUN_ING
.
getCode
());
runRecordingByFlowIdAndRunId
.
setStartTime
(
new
Date
());
runRecordingService
.
updateRunRecordingById
(
runRecordingByFlowIdAndRunId
);
}
...
...
byit-myth-rpc/src/main/java/com/byit/rpc/registry/impl/RegistryServiceRegistry.java
View file @
4b395198
...
...
@@ -60,6 +60,20 @@ public class RegistryServiceRegistry extends ServiceRegistry {
return
registryClient
.
registry
(
registryDataList
);
}
public
static
void
main
(
String
[]
args
)
throws
InterruptedException
{
/*for (int i = 0; i < 10; i++) {
Thread.sleep(1000);*/
RegistryClient
registryClient
=
new
RegistryClient
(
"http://localhost:8080/myth-register"
,
null
,
"myth-job"
,
"test"
);
List
<
RegistryDataParamVO
>
registryDataList
=
new
ArrayList
<>();
RegistryDataParamVO
registryDataParamVO
=
new
RegistryDataParamVO
(
"testRun"
,
"127.0.0.1:8989"
);
RegistryDataParamVO
registryDataParamVO1
=
new
RegistryDataParamVO
(
"testRun"
,
"127.0.0.1:8975"
);
registryDataList
.
add
(
registryDataParamVO
);
registryDataList
.
add
(
registryDataParamVO1
);
registryClient
.
registry
(
registryDataList
);
//}
}
@Override
public
boolean
remove
(
Set
<
String
>
keys
,
String
value
)
{
if
(
keys
==
null
||
keys
.
size
()
==
0
||
value
==
null
)
{
...
...
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