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
b899a492
Commit
b899a492
authored
Feb 27, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改变邮件日志显示格式
parent
fac8a599
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
7 deletions
+31
-7
application-dev.yml
byit-myth-admin/src/main/resources/application-dev.yml
+12
-7
RunRecordingScanHelper.java
...src/main/java/com/byit/thread/RunRecordingScanHelper.java
+19
-0
No files found.
byit-myth-admin/src/main/resources/application-dev.yml
View file @
b899a492
...
...
@@ -6,13 +6,13 @@ spring:
password
:
123456
mail
:
host
:
smtp.163.com
#
我自己的SMTP服务器地
址
username
:
huangfusuper@163.com
#
登录用户名
password
:
huangfu0110
#
授权密码
host
:
smtp.163.com
#
���Լ���SMTP��������ַ
username
:
huangfusuper@163.com
#
��¼�û���
password
:
huangfu0110
#
��Ȩ����
default-encoding
:
UTF-8
protocol
:
smtp
#协
议
protocol
:
smtp
#Э
��
properties
:
from
:
huangfusuper@163.com
#
真实邮箱
from
:
huangfusuper@163.com
#
��ʵ����
mybatis
:
mapper-locations
:
/mapper/*.xml
...
...
@@ -25,4 +25,9 @@ myth-rpc:
port
:
6665
logging
:
path
:
/data/mythjob
file
:
myth_log_file
\ No newline at end of file
file
:
myth_log_file
file
:
system
:
ip
:
10.0.120.2
port
:
88
\ No newline at end of file
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/RunRecordingScanHelper.java
View file @
b899a492
...
...
@@ -12,6 +12,7 @@ import com.byit.service.RunRecordingService;
import
com.byit.util.TimeFormatUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
javax.sql.DataSource
;
...
...
@@ -45,6 +46,19 @@ public class RunRecordingScanHelper {
*/
public
static
final
String
SUCCESS_DONE
=
"3"
;
/**
* 文件服务器ip
*/
@Value
(
"${file.system.ip}"
)
private
String
fileSystemIp
;
/**
* 文件服务器端口号
*/
@Value
(
"${file.system.port}"
)
private
String
fileSystemPort
;
private
static
final
String
FILE_SYSTEM_PRE
=
"http://"
;
private
DataSource
dataSource
;
private
final
EmailAlarmService
emailAlarmService
;
...
...
@@ -239,6 +253,11 @@ public class RunRecordingScanHelper {
jobTaskRunLogs
.
forEach
(
jobTaskRunLog
->
{
long
timeConsuming
=
jobTaskRunLog
.
getEndTime
().
getTime
()
-
jobTaskRunLog
.
getStartTime
().
getTime
();
log
.
info
(
"######################{}#####################3"
,
timeConsuming
);
/*
* String iframeHtml = "<iframe src='%s'></iframe>";
* String logFilePath = FILE_SYSTEM_PRE+fileSystemIp+":"+fileSystemPort+"/"+jobTaskRunLog.getLogRemotelyPath();
* String logFileUrl = String.format(iframeHtml,logFilePath);
*/
stringBuilder
.
append
(
"<tr align='center'>"
)
.
append
(
String
.
format
(
"<td>%s</td>"
,
jobTaskRunLog
.
getNodeName
()))
.
append
(
String
.
format
(
"<td>%s</td>"
,
DateUtil
.
format
(
jobTaskRunLog
.
getStartTime
(),
DATE_FORMAT
)))
...
...
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