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
90347d63
Commit
90347d63
authored
Dec 29, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决虚节点不支持多实例无法运行的BUG
parent
b0d15d2a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
6 deletions
+45
-6
FastDfsFileSystemTest.java
...h-admin/src/test/java/com/byit/FastDfsFileSystemTest.java
+29
-0
RunRecordingAndJobTaskServiceImpl.java
...ce/mapservice/impl/RunRecordingAndJobTaskServiceImpl.java
+6
-1
FastDfsFileSystem.java
.../src/main/java/com/byit/filesystem/FastDfsFileSystem.java
+3
-0
JobUtils.java
...xecutor-plugin/src/main/java/com/byit/utils/JobUtils.java
+7
-5
No files found.
byit-myth-admin/src/test/java/com/byit/FastDfsFileSystemTest.java
0 → 100644
View file @
90347d63
package
com
.
byit
;
import
com.byit.filesystem.FastDfsFileSystem
;
import
com.github.tobato.fastdfs.service.FastFileStorageClient
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
import
java.io.ByteArrayInputStream
;
import
java.util.HashMap
;
@SpringBootTest
(
classes
=
AdminApplication
.
class
)
@RunWith
(
SpringRunner
.
class
)
public
class
FastDfsFileSystemTest
{
@Autowired
private
FastFileStorageClient
fastFileStorageClient
;
@Test
public
void
test
(){
HashMap
<
String
,
String
>
stringStringHashMap
=
new
HashMap
<>();
stringStringHashMap
.
put
(
"filename"
,
"hahah"
);
byte
[]
bytes
=
"nihao"
.
getBytes
();
ByteArrayInputStream
byteInput
=
new
ByteArrayInputStream
(
bytes
);
System
.
out
.
println
(
fastFileStorageClient
.
uploadFile
(
byteInput
,
bytes
.
length
,
".txt"
,
null
).
getFullPath
());
}
}
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/mapservice/impl/RunRecordingAndJobTaskServiceImpl.java
View file @
90347d63
...
@@ -86,10 +86,15 @@ public class RunRecordingAndJobTaskServiceImpl implements RunRecordingAndJobTask
...
@@ -86,10 +86,15 @@ public class RunRecordingAndJobTaskServiceImpl implements RunRecordingAndJobTask
String
hasManyInstance
=
flowExtendedConfiguration
.
getHasManyInstance
();
String
hasManyInstance
=
flowExtendedConfiguration
.
getHasManyInstance
();
//如果虚节点设置为不支持多实例
//如果虚节点设置为不支持多实例
if
(
FlowPropertyEnum
.
NOT_MANY_INSTANCE
.
getCode
().
equals
(
hasManyInstance
))
{
if
(
FlowPropertyEnum
.
NOT_MANY_INSTANCE
.
getCode
().
equals
(
hasManyInstance
))
{
log
.
info
(
"不支持多实例{}"
,
virFlow
);
log
.
info
(
"不支持多实例{},查询对应的工作流是否处于运行中的状态"
,
virFlow
);
//查找是否有工作流正在运行中 true有 false没有
boolean
runRecordingIsRunning
=
runRecordingService
.
findRunRecordingIsRunning
(
virFlow
.
getFlowId
());
if
(
runRecordingIsRunning
){
return
;
return
;
}
}
}
virFlow
.
setScanMark
(
"2"
);
virFlow
.
setScanMark
(
"2"
);
RunRecording
mainRecording
=
runRecordingService
.
findRunRecordingByFlowIdAndRunId
(
jobTask
.
getFlowId
(),
jobTask
.
getRunId
());
RunRecording
mainRecording
=
runRecordingService
.
findRunRecordingByFlowIdAndRunId
(
jobTask
.
getFlowId
(),
jobTask
.
getRunId
());
...
...
byit-myth-core/myth-core-common/src/main/java/com/byit/filesystem/FastDfsFileSystem.java
View file @
90347d63
...
@@ -4,6 +4,7 @@ import com.github.tobato.fastdfs.FdfsClientConfig;
...
@@ -4,6 +4,7 @@ import com.github.tobato.fastdfs.FdfsClientConfig;
import
com.github.tobato.fastdfs.domain.MateData
;
import
com.github.tobato.fastdfs.domain.MateData
;
import
com.github.tobato.fastdfs.domain.StorePath
;
import
com.github.tobato.fastdfs.domain.StorePath
;
import
com.github.tobato.fastdfs.proto.storage.DownloadByteArray
;
import
com.github.tobato.fastdfs.proto.storage.DownloadByteArray
;
import
com.github.tobato.fastdfs.service.DefaultFastFileStorageClient
;
import
com.github.tobato.fastdfs.service.FastFileStorageClient
;
import
com.github.tobato.fastdfs.service.FastFileStorageClient
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnExpression
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnExpression
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.Import
;
...
@@ -77,6 +78,8 @@ public class FastDfsFileSystem implements FileSystem {
...
@@ -77,6 +78,8 @@ public class FastDfsFileSystem implements FileSystem {
}
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
FastFileStorageClient
fastFileStorageClient
=
new
DefaultFastFileStorageClient
();
System
.
out
.
println
(
getPath
(
"ddmp/M00/00/09/CgB4Al6mSVSAHi-rAAAABhCiqmE437.log"
));
System
.
out
.
println
(
getPath
(
"ddmp/M00/00/09/CgB4Al6mSVSAHi-rAAAABhCiqmE437.log"
));
}
}
}
}
byit-myth-executor/myth-executor-plugin/src/main/java/com/byit/utils/JobUtils.java
View file @
90347d63
...
@@ -439,11 +439,7 @@ public class JobUtils {
...
@@ -439,11 +439,7 @@ public class JobUtils {
return
JSON
.
parseObject
(
response
,
ResponseResult
.
class
);
return
JSON
.
parseObject
(
response
,
ResponseResult
.
class
);
}
}
public
static
void
main
(
String
[]
args
)
{
JobUtils
.
setTOKEN
(
"huangfu"
);
JobUtils
.
setRequestUrl
(
"http://10.0.120.208:8998/myth-job-admin"
);
System
.
out
.
println
(
stopFlow
(
"皇甫"
,
"科星"
));
}
/**
/**
* 删除工作流
* 删除工作流
...
@@ -690,6 +686,12 @@ public class JobUtils {
...
@@ -690,6 +686,12 @@ public class JobUtils {
return
JSON
.
parseObject
(
response
,
ResponseResult
.
class
);
return
JSON
.
parseObject
(
response
,
ResponseResult
.
class
);
}
}
public
static
void
main
(
String
[]
args
)
{
JobUtils
.
setTOKEN
(
"huangfu"
);
JobUtils
.
setRequestUrl
(
"http://10.0.120.208:8998/myth-job-admin"
);
System
.
out
.
println
(
existWorkspace
(
"test_0827_prod0000"
));
}
/**
/**
* 立即运行节点
* 立即运行节点
*
*
...
...
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