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
1fbf0523
Commit
1fbf0523
authored
Mar 24, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实时运行实例
parent
f9a7aab3
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
7 deletions
+27
-7
logback-spring.xml
byit-myth-admin/src/main/resources/logback-spring.xml
+1
-1
JobTaskRunLogServiceImpl.java
.../java/com/byit/service/impl/JobTaskRunLogServiceImpl.java
+1
-1
ScheduleThreadRunHelper.java
.../java/com/byit/thread/helper/ScheduleThreadRunHelper.java
+1
-1
FastDfsFileSystem.java
.../src/main/java/com/byit/filesystem/FastDfsFileSystem.java
+11
-0
ZuulRouteLocator.java
...src/main/java/com/byit/gateway/zuul/ZuulRouteLocator.java
+2
-2
AddComplexPy.java
...-demo-client/src/main/java/com/byit/job/AddComplexPy.java
+11
-2
No files found.
byit-myth-admin/src/main/resources/logback-spring.xml
View file @
1fbf0523
...
...
@@ -58,7 +58,7 @@
</encoder>
</appender>
<logger
name=
"com.byit.thread"
level=
"info"
additivity=
"false"
>
<logger
name=
"com.byit.thread
.helper
"
level=
"info"
additivity=
"false"
>
<appender-ref
ref=
"console"
/>
</logger>
<logger
name=
"com.byit.selector"
level=
"info"
additivity=
"false"
>
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/JobTaskRunLogServiceImpl.java
View file @
1fbf0523
...
...
@@ -63,7 +63,7 @@ public class JobTaskRunLogServiceImpl implements JobTaskRunLogService {
@Override
public
int
saveJobTaskRunLog
(
JobTaskRunLogWithBLOBs
jobTaskRunLog
)
{
log
.
info
(
"--------------saveJobTaskRunLog start【{}】------------------------"
,
jobTaskRunLog
);
log
.
debug
(
"--------------saveJobTaskRunLog start【{}】------------------------"
,
jobTaskRunLog
);
return
jobTaskRunLogMapper
.
saveJobTaskRunLog
(
jobTaskRunLog
);
}
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/helper/ScheduleThreadRunHelper.java
View file @
1fbf0523
...
...
@@ -64,7 +64,7 @@ public class ScheduleThreadRunHelper extends BaseThreadRunHelper {
log
.
debug
(
"------节点{},开始构建java执行器-------"
,
mythJobTaskSchedule
);
//构建调度执行器
timerTask
=
new
JavaBeanJobTask
(
mythJobTaskSchedule
);
}
else
if
(
NodeTypeEnum
.
SCRIPT
.
getTyp
e
().
equals
(
mythJobTaskSchedule
.
getJobType
())){
}
else
if
(
NodeTypeEnum
.
PYTHON
.
getCod
e
().
equals
(
mythJobTaskSchedule
.
getJobType
())){
log
.
debug
(
"------节点{},开始构建脚本执行器-------"
,
mythJobTaskSchedule
);
//构建脚本调度执行器
timerTask
=
new
ScriptExecutorJobTask
(
mythJobTaskSchedule
);
...
...
byit-myth-core/myth-core-common/src/main/java/com/byit/filesystem/FastDfsFileSystem.java
View file @
1fbf0523
...
...
@@ -75,9 +75,20 @@ public class FastDfsFileSystem implements FileSystem {
StorageClient1
storageClient1
=
new
StorageClient1
(
trackerServer
,
null
);
NameValuePair
[]
metadata1
=
storageClient1
.
get_metadata1
(
filePath
);
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>(
5
);
if
(
metadata1
!=
null
){
for
(
int
i
=
0
;
i
<
metadata1
.
length
;
i
++)
{
map
.
put
(
metadata1
[
i
].
getName
(),
metadata1
[
i
].
getValue
());
}
}
else
{
map
.
put
(
"filename"
,
"filename"
+
filePath
.
substring
(
filePath
.
lastIndexOf
(
"."
),
filePath
.
length
()));
}
return
map
;
}
public
static
void
main
(
String
[]
args
)
{
String
filePath
=
"sadsadsadsadsad.py"
;
System
.
out
.
println
(
filePath
.
substring
(
filePath
.
lastIndexOf
(
"."
),
filePath
.
length
()));
}
}
byit-myth-gateway/src/main/java/com/byit/gateway/zuul/ZuulRouteLocator.java
View file @
1fbf0523
...
...
@@ -77,8 +77,8 @@ public abstract class ZuulRouteLocator extends SimpleRouteLocator implements Ref
/**
* 复制查询出来的数据的属性
*/
public
Map
<
String
,
ZuulRoute
>
handle
(
List
<
ZuulRouteEntity
>
locateRouteList
)
{
if
(
CollectionUtils
.
isEmpty
(
locateRouteList
))
{
public
Map
<
String
,
ZuulRoute
>
handle
(
List
<
ZuulRouteEntity
>
locateRouteList
)
{
if
(
CollectionUtils
.
isEmpty
(
locateRouteList
))
{
return
null
;
}
Map
<
String
,
ZuulRoute
>
routes
=
new
LinkedHashMap
<>();
...
...
demo-client/byit-demo-client/src/main/java/com/byit/job/AddComplexPy.java
View file @
1fbf0523
...
...
@@ -13,12 +13,21 @@ import java.util.concurrent.TimeUnit;
*/
public
class
AddComplexPy
{
public
static
void
main
(
String
[]
args
)
{
PluginPackage
pluginPackage
=
new
PluginPackage
();
RunNode
runNode
=
new
RunNode
();
runNode
.
setScriptUrl
(
"ddmp/M00/00/00/CgB4Al5wa36AaUJ7AAAAiYy1k-k9801.py"
);
runNode
.
setJobType
(
"PYTHON"
);
runNode
.
setNodeId
(
"2"
);
runNode
.
setNodeName
(
"lijkki"
);
runNode
.
setRunCmd
(
"python ${biz_file}"
);
JobUtils
.
setRequestUrl
(
"http://127.0.0.1:8081/myth-job-admin"
);
JobUtils
.
setTOKEN
(
"test"
);
JobUtils
.
realExectNode
(
runNode
);
/* PluginPackage pluginPackage = new PluginPackage();
pluginPackage.setWorkspaceName("test");
pluginPackage.setFlow(createFlow());
JobUtils.setRequestUrl("http://127.0.0.1:8998");
JobUtils.setTOKEN("test");
JobUtils
.
publish
(
pluginPackage
);
JobUtils.publish(pluginPackage);
*/
}
...
...
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