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
972746f2
Commit
972746f2
authored
May 15, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改变fdfs ip的注入配置
parent
c5502c2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
RunRecordingAndEmailServiceImpl.java
...vice/mapservice/impl/RunRecordingAndEmailServiceImpl.java
+7
-5
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/mapservice/impl/RunRecordingAndEmailServiceImpl.java
View file @
972746f2
...
@@ -10,6 +10,7 @@ import com.byit.service.JobTaskRunLogService;
...
@@ -10,6 +10,7 @@ import com.byit.service.JobTaskRunLogService;
import
com.byit.service.RunRecordingService
;
import
com.byit.service.RunRecordingService
;
import
com.byit.service.mapservice.RunRecordingAndEmailService
;
import
com.byit.service.mapservice.RunRecordingAndEmailService
;
import
com.byit.util.TimeFormatUtil
;
import
com.byit.util.TimeFormatUtil
;
import
com.github.tobato.fastdfs.conn.TrackerConnectionManager
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -37,16 +38,16 @@ public class RunRecordingAndEmailServiceImpl implements RunRecordingAndEmailServ
...
@@ -37,16 +38,16 @@ public class RunRecordingAndEmailServiceImpl implements RunRecordingAndEmailServ
*/
*/
private
final
RunRecordingService
runRecordingService
;
private
final
RunRecordingService
runRecordingService
;
@Value
(
"${fdfs.tracker-list}"
)
private
final
TrackerConnectionManager
trackerConnectionManager
;
private
List
<
String
>
trackerIps
;
@Value
(
"${fdfs.http-port}"
)
@Value
(
"${fdfs.http-port}"
)
private
String
trackerIpsPort
;
private
String
trackerIpsPort
;
public
RunRecordingAndEmailServiceImpl
(
EmailAlarmService
emailAlarmService
,
JobTaskRunLogService
jobTaskRunLogService
,
public
RunRecordingAndEmailServiceImpl
(
EmailAlarmService
emailAlarmService
,
JobTaskRunLogService
jobTaskRunLogService
,
RunRecordingService
runRecordingService
)
{
RunRecordingService
runRecordingService
,
TrackerConnectionManager
trackerConnectionManager
)
{
this
.
emailAlarmService
=
emailAlarmService
;
this
.
emailAlarmService
=
emailAlarmService
;
this
.
jobTaskRunLogService
=
jobTaskRunLogService
;
this
.
jobTaskRunLogService
=
jobTaskRunLogService
;
this
.
runRecordingService
=
runRecordingService
;
this
.
runRecordingService
=
runRecordingService
;
this
.
trackerConnectionManager
=
trackerConnectionManager
;
}
}
@Override
@Override
...
@@ -104,8 +105,9 @@ public class RunRecordingAndEmailServiceImpl implements RunRecordingAndEmailServ
...
@@ -104,8 +105,9 @@ public class RunRecordingAndEmailServiceImpl implements RunRecordingAndEmailServ
String
logStr
=
"无远程路径"
;
String
logStr
=
"无远程路径"
;
if
(
StringUtils
.
isNotBlank
(
jobTaskRunLog
.
getLogRemotelyPath
())){
if
(
StringUtils
.
isNotBlank
(
jobTaskRunLog
.
getLogRemotelyPath
())){
logStr
=
jobTaskRunLog
.
getLogRemotelyPath
();
logStr
=
jobTaskRunLog
.
getLogRemotelyPath
();
if
(
CollectionUtil
.
isNotEmpty
(
trackerIps
))
{
List
<
String
>
trackerList
=
trackerConnectionManager
.
getTrackerList
();
for
(
String
ipPort
:
trackerIps
)
{
if
(
CollectionUtil
.
isNotEmpty
(
trackerList
))
{
for
(
String
ipPort
:
trackerList
)
{
String
ip
=
ipPort
.
split
(
":"
)[
0
];
String
ip
=
ipPort
.
split
(
":"
)[
0
];
String
baseUrl
=
"http://"
+
ip
+
":"
+
trackerIpsPort
+
"/"
;
String
baseUrl
=
"http://"
+
ip
+
":"
+
trackerIpsPort
+
"/"
;
logStr
=
baseUrl
+
logStr
+
"\n"
;
logStr
=
baseUrl
+
logStr
+
"\n"
;
...
...
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