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
4c01a502
Commit
4c01a502
authored
Jun 20, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
7c6241eb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
27 additions
and
20 deletions
+27
-20
brg-queue-center/.gitignore
+0
-0
brg-queue-center/app/base/api/api.base.js
+5
-5
brg-queue-center/app/base/api/impl/test/testData.js
+0
-0
brg-queue-center/app/base/db/consumer.base.js
+6
-4
brg-queue-center/app/base/db/consumer/publicFail/publicFailConsumer.js
+0
-0
brg-queue-center/app/base/db/consumer/publicLogs/publicLogsConsumer.js
+0
-0
brg-queue-center/app/base/db/consumer/publicNotify/publicNotifyConsumer.js
+0
-0
brg-queue-center/app/base/db/consumer/publicServiceAllocation/publicConsumer.js
+0
-0
brg-queue-center/app/base/db/dao.base.js
+0
-0
brg-queue-center/app/base/db/impl/common/connection.js
+0
-0
brg-queue-center/app/base/service/impl/utilsSve/utilsIcSve.js
+6
-4
brg-queue-center/app/base/service/impl/utilsSve/utilsProduceSve.js
+0
-0
brg-queue-center/app/base/service/impl/utilsSve/utilsTxCosSve.js
+0
-0
brg-queue-center/app/base/system.js
+1
-1
brg-queue-center/app/base/utils/esUtils.js
+3
-2
brg-queue-center/app/base/utils/execClient.js
+2
-1
brg-queue-center/app/base/utils/redisClient.js
+2
-1
brg-queue-center/app/config/environment.js
+0
-0
brg-queue-center/app/config/localsettings.js
+1
-1
brg-queue-center/app/config/objsettings.js
+0
-0
brg-queue-center/app/config/platform.js
+0
-0
brg-queue-center/app/config/routes.js
+0
-0
brg-queue-center/app/config/settings.js
+1
-1
brg-queue-center/main.js
+0
-0
brg-queue-center/package-lock.json
+0
-0
brg-queue-center/package.json
+0
-0
brg-queue-center/readme.txt
+0
-0
No files found.
brg-queue-center/.gitignore
View file @
4c01a502
brg-queue-center/app/base/api/api.base.js
View file @
4c01a502
...
...
@@ -24,17 +24,17 @@ class APIBase {
pobj
.
actionBody
.
resultInfo
=
result
;
pobj
.
actionBody
.
requestId
=
result
.
requestId
;
pobj
.
actionBody
.
opTitle
=
"reqPath:"
+
req
.
path
;
this
.
esUtils
.
addEsLogs
(
settings
.
queuedName
+
"api-req"
,
pobj
.
actionBody
);
this
.
esUtils
.
addEsLogs
(
settings
.
queuedName
+
"api-req"
,
pobj
);
}
return
result
;
}
catch
(
e
)
{
var
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
console
.
log
(
stackStr
,
"api.base调用出现异常,请联系管理员.........."
);
}
catch
(
e
rror
)
{
var
stackStr
=
e
rror
.
stack
?
error
.
stack
:
JSON
.
stringify
(
error
);
//
console.log(stackStr, "api.base调用出现异常,请联系管理员..........");
var
rtnerror
=
system
.
getResultFail
(
-
200
,
"出现异常,error:"
+
stackStr
);
pobj
.
actionBody
.
requestId
=
await
this
.
getBusUid
(
"err"
);
pobj
.
actionBody
.
errorInfo
=
stackStr
;
pobj
.
actionBody
.
opTitle
=
",reqPath:"
+
req
.
path
;
this
.
esUtils
.
addEsLogs
(
settings
.
queuedName
+
"apidoexec-error"
,
pobj
.
actionBody
);
this
.
esUtils
.
addEsLogs
(
settings
.
queuedName
+
"apidoexec-error"
,
pobj
);
return
rtnerror
;
}
}
...
...
brg-queue-center/app/base/api/impl/test/testData.js
0 → 100755
View file @
4c01a502
This diff is collapsed.
Click to expand it.
brg-queue-center/app/base/db/consumer.base.js
View file @
4c01a502
...
...
@@ -33,9 +33,10 @@ class ConsumerBase {
}
});
}
catch
(
error
)
{
this
.
errorLogDao
.
addOpErrorLogs
(
"队列执行doConsumer存在异常"
,
null
,
null
,
error
.
stack
,
3
);
var
stackStr
=
error
.
stack
?
error
.
stack
:
JSON
.
stringify
(
error
);
this
.
errorLogDao
.
addOpErrorLogs
(
"队列执行doConsumer存在异常"
,
null
,
null
,
stackStr
,
3
);
//日志
console
.
log
(
error
.
stack
,
",队列执行doConsumer存在异常"
);
console
.
log
(
stackStr
,
",队列执行doConsumer存在异常"
);
}
}
...
...
@@ -71,9 +72,10 @@ class ConsumerBase {
}
execResult
=
await
this
.
subDoConsumer
(
queuedName
,
actionBody
);
}
catch
(
error
)
{
this
.
errorLogDao
.
addOpErrorLogs
(
"队列执行execSubDoConsumer存在异常"
,
actionBody
,
execResult
,
error
.
stack
,
3
);
var
stackStr
=
error
.
stack
?
error
.
stack
:
JSON
.
stringify
(
error
);
this
.
errorLogDao
.
addOpErrorLogs
(
"队列执行execSubDoConsumer存在异常"
,
actionBody
,
execResult
,
stackStr
,
3
);
//日志记录
console
.
log
(
error
.
stack
,
",队列执行execSubDoConsumer存在异常"
);
console
.
log
(
stackStr
,
",队列执行execSubDoConsumer存在异常"
);
}
}
...
...
brg-queue-center/app/base/db/consumer/publicFail/publicFailConsumer.js
View file @
4c01a502
brg-queue-center/app/base/db/consumer/publicLogs/publicLogsConsumer.js
View file @
4c01a502
brg-queue-center/app/base/db/consumer/publicNotify/publicNotifyConsumer.js
View file @
4c01a502
brg-queue-center/app/base/db/consumer/publicServiceAllocation/publicConsumer.js
View file @
4c01a502
brg-queue-center/app/base/db/dao.base.js
View file @
4c01a502
brg-queue-center/app/base/db/impl/common/connection.js
View file @
4c01a502
brg-queue-center/app/base/service/impl/utilsSve/utilsIcSve.js
View file @
4c01a502
...
...
@@ -114,8 +114,9 @@ class UtilsIcService extends AppServiceBase {
sources
.
push
(
source
);
});
return
system
.
getResultSuccess
(
data
);
}
catch
(
e
)
{
console
.
log
(
e
.
stack
,
".. getListByLikeCompanyName query is error"
);
}
catch
(
error
)
{
var
stackStr
=
error
.
stack
?
error
.
stack
:
JSON
.
stringify
(
error
);
console
.
log
(
stackStr
,
".. getListByLikeCompanyName query is error"
);
//TODO:日志
return
system
.
getResultError
(
"query is error"
);
}
...
...
@@ -206,9 +207,10 @@ class UtilsIcService extends AppServiceBase {
"companyCate3"
:
resultData
.
data
.
hits
.
hits
[
0
].
_source
.
company_cate_3
||
""
//行业分类三级分类
};
return
system
.
getResultSuccess
(
item
);
}
catch
(
e
)
{
}
catch
(
error
)
{
var
stackStr
=
error
.
stack
?
error
.
stack
:
JSON
.
stringify
(
error
);
//TODO:日志
console
.
log
(
e
.
stack
,
".. getItemByCompanyName query is error"
);
console
.
log
(
stackStr
,
".. getItemByCompanyName query is error"
);
return
system
.
getResultError
(
"query is error"
);
}
}
...
...
brg-queue-center/app/base/service/impl/utilsSve/utilsProduceSve.js
View file @
4c01a502
brg-queue-center/app/base/service/impl/utilsSve/utilsTxCosSve.js
View file @
4c01a502
brg-queue-center/app/base/system.js
View file @
4c01a502
...
...
@@ -216,7 +216,7 @@ class System {
try
{
ClassObj
=
require
(
objabspath
);
}
catch
(
e
)
{
console
.
log
(
e
.
stack
,
"...getObject.....errror"
);
// console.log(e.stack, "...getObject.....errror");
let
fname
=
objsettings
[
packageName
+
"base"
];
ClassObj
=
require
(
fname
);
}
...
...
brg-queue-center/app/base/utils/esUtils.js
View file @
4c01a502
...
...
@@ -85,8 +85,9 @@ class EsUtils {
}
return
system
.
getResultSuccess
(
stdoutInfo
);
}
catch
(
error
)
{
console
.
log
(
error
.
stack
,
"......execPostEs....error....."
);
this
.
errorLogDao
.
addOpErrorLogs
(
queuedName
+
"执行execPostEs存在异常"
,
params
,
null
,
error
.
stack
,
3
);
var
stackStr
=
error
.
stack
?
error
.
stack
:
JSON
.
stringify
(
error
);
console
.
log
(
stackStr
,
"......execPostEs....error....."
);
this
.
errorLogDao
.
addOpErrorLogs
(
queuedName
+
"执行execPostEs存在异常"
,
params
,
null
,
stackStr
,
3
);
}
}
}
...
...
brg-queue-center/app/base/utils/execClient.js
View file @
4c01a502
...
...
@@ -61,7 +61,8 @@ class ExecClient {
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
}
catch
(
error
)
{
this
.
errorLogDao
.
addOpErrorLogs
(
execFile
+
"执行execPostByTimeOut存在异常"
,
params
,
rtn
.
stdout
,
error
.
stack
,
3
);
var
stackStr
=
error
.
stack
?
error
.
stack
:
JSON
.
stringify
(
error
);
this
.
errorLogDao
.
addOpErrorLogs
(
execFile
+
"执行execPostByTimeOut存在异常"
,
params
,
rtn
?
rtn
.
stdout
:
null
,
stackStr
,
3
);
return
system
.
getResultFail
(
-
200
,
execFile
+
"执行execPostByTimeOut存在异常"
);
}
}
...
...
brg-queue-center/app/base/utils/redisClient.js
View file @
4c01a502
...
...
@@ -42,8 +42,9 @@ class RedisClient {
await
self
.
zremRangebyscoreData
(
opResult
[
0
],
opResult
[
1
],
opResult
[
1
]);
}
}
catch
(
error
)
{
var
stackStr
=
error
.
stack
?
error
.
stack
:
JSON
.
stringify
(
error
);
//TODO:日志处理
console
.
log
(
error
.
stack
,
".....message......................error..........."
);
console
.
log
(
stackStr
,
".....message......................error..........."
);
}
});
...
...
brg-queue-center/app/config/environment.js
View file @
4c01a502
brg-queue-center/app/config/localsettings.js
View file @
4c01a502
...
...
@@ -5,7 +5,7 @@ var settings = {
host
:
"43.247.184.32"
,
port
:
8967
,
password
:
"Gongsibao2018"
,
db
:
2
,
db
:
1
,
},
database
:
{
dbname
:
"tx-queue-log"
,
...
...
brg-queue-center/app/config/objsettings.js
View file @
4c01a502
brg-queue-center/app/config/platform.js
100644 → 100755
View file @
4c01a502
File mode changed from 100644 to 100755
brg-queue-center/app/config/routes.js
View file @
4c01a502
brg-queue-center/app/config/settings.js
View file @
4c01a502
...
...
@@ -9,7 +9,7 @@ var ENVINPUT = {
REDIS_PWD
:
process
.
env
.
REDIS_PWD
,
REDIS_DB
:
process
.
env
.
QUEUE_REDIS_DB
,
DB_NAME
:
process
.
env
.
QUEUE_DB_NAME
,
APP_ENV
:
process
.
env
.
APP_ENV
?
process
.
env
.
APP_ENV
:
"
test"
,
//运行环境
APP_ENV
:
process
.
env
.
APP_ENV
?
process
.
env
.
APP_ENV
:
"
dev"
,
//运行环境
CONSUMER_NAME
:
process
.
env
.
CONSUMER_NAME
||
"publicServiceAllocation.publicConsumer"
,
//消费者名称
QUEUED_NAME
:
process
.
env
.
QUEUED_NAME
||
"SYTXPUBLIC-MSGQ"
,
//队列名称,FAIL-失败队列(队列和失败队列一对存在进行部署)
};
...
...
brg-queue-center/main.js
View file @
4c01a502
brg-queue-center/package-lock.json
View file @
4c01a502
brg-queue-center/package.json
View file @
4c01a502
brg-queue-center/readme.txt
View file @
4c01a502
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