Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
92abf713
Commit
92abf713
authored
Jun 21, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
4c01a502
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
brg-queue-center/app/base/db/impl/opLogs/errorLogDao.js
+1
-0
brg-queue-center/app/base/utils/execClient.js
+3
-2
No files found.
brg-queue-center/app/base/db/impl/opLogs/errorLogDao.js
View file @
92abf713
...
@@ -25,6 +25,7 @@ class ErrorLogDao extends Dao {
...
@@ -25,6 +25,7 @@ class ErrorLogDao extends Dao {
result_info
:
execResult
||
null
,
result_info
:
execResult
||
null
,
request_id
:
actionBody
.
requestId
,
request_id
:
actionBody
.
requestId
,
client_ip
:
actionBody
.
clientIp
||
""
,
client_ip
:
actionBody
.
clientIp
||
""
,
log_level
:
logLevel
,
created_at
:
new
Date
()
created_at
:
new
Date
()
}
}
await
this
.
create
(
params
);
await
this
.
create
(
params
);
...
...
brg-queue-center/app/base/utils/execClient.js
View file @
92abf713
...
@@ -4,6 +4,7 @@ const util = require('util');
...
@@ -4,6 +4,7 @@ const util = require('util');
const
exec
=
util
.
promisify
(
require
(
'child_process'
).
exec
);
const
exec
=
util
.
promisify
(
require
(
'child_process'
).
exec
);
const
settings
=
require
(
"../../../app/config/settings"
);
const
settings
=
require
(
"../../../app/config/settings"
);
const
axios
=
require
(
'axios'
);
const
axios
=
require
(
'axios'
);
const
{
json
}
=
require
(
'sequelize'
);
class
ExecClient
{
class
ExecClient
{
constructor
()
{
constructor
()
{
this
.
cmdGetPattern
=
"curl -G -X GET '{url}'"
;
this
.
cmdGetPattern
=
"curl -G -X GET '{url}'"
;
...
@@ -51,7 +52,7 @@ class ExecClient {
...
@@ -51,7 +52,7 @@ class ExecClient {
return
result
.
data
;
return
result
.
data
;
}
}
this
.
errorLogDao
.
addOpErrorLogs
(
queuedName
+
"执行execPostTimeOutByBusiness存在错误"
,
params
,
result
,
null
,
3
);
this
.
errorLogDao
.
addOpErrorLogs
(
queuedName
+
"执行execPostTimeOutByBusiness存在错误"
,
params
,
result
,
null
,
3
);
return
system
.
getResult
(
null
,
"执行execPostTimeOutByBusiness存在错误
"
);
return
system
.
getResult
(
null
,
"执行execPostTimeOutByBusiness存在错误
,error:"
+
JSON
.
stringify
(
result
)
);
}
}
//方式二
//方式二
rtn
=
await
this
.
execPostTimeOut
(
params
,
url
,
ContentType
,
headData
,
timeOut
);
rtn
=
await
this
.
execPostTimeOut
(
params
,
url
,
ContentType
,
headData
,
timeOut
);
...
@@ -63,7 +64,7 @@ class ExecClient {
...
@@ -63,7 +64,7 @@ class ExecClient {
}
catch
(
error
)
{
}
catch
(
error
)
{
var
stackStr
=
error
.
stack
?
error
.
stack
:
JSON
.
stringify
(
error
);
var
stackStr
=
error
.
stack
?
error
.
stack
:
JSON
.
stringify
(
error
);
this
.
errorLogDao
.
addOpErrorLogs
(
execFile
+
"执行execPostByTimeOut存在异常"
,
params
,
rtn
?
rtn
.
stdout
:
null
,
stackStr
,
3
);
this
.
errorLogDao
.
addOpErrorLogs
(
execFile
+
"执行execPostByTimeOut存在异常"
,
params
,
rtn
?
rtn
.
stdout
:
null
,
stackStr
,
3
);
return
system
.
getResultFail
(
-
200
,
execFile
+
"执行execPostByTimeOut存在异常
"
);
return
system
.
getResultFail
(
-
200
,
execFile
+
"执行execPostByTimeOut存在异常
,error:"
+
stackStr
);
}
}
}
}
...
...
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