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
6b6406ff
Commit
6b6406ff
authored
Jul 01, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
92c8111b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
1 deletions
+50
-1
brg-queue-center/app/base/db/consumer.base.js
+1
-1
brg-queue-center/app/base/db/consumer/publicServiceAllocation/publicConsumer.js
+11
-0
brg-queue-center/app/config/localsettings.js
+38
-0
No files found.
brg-queue-center/app/base/db/consumer.base.js
View file @
6b6406ff
...
@@ -21,7 +21,7 @@ class ConsumerBase {
...
@@ -21,7 +21,7 @@ class ConsumerBase {
counter
=
1
;
counter
=
1
;
}
}
var
self
=
this
;
var
self
=
this
;
this
.
duplicateInstance
.
brpop
(
queuedName
,
0
,
async
function
(
err
,
repl
)
{
this
.
duplicateInstance
.
brpop
(
queuedName
,
1080
0
,
async
function
(
err
,
repl
)
{
if
(
err
)
{
if
(
err
)
{
return
new
Error
(
'doConsumer brpop error :'
+
err
);
return
new
Error
(
'doConsumer brpop error :'
+
err
);
}
}
...
...
brg-queue-center/app/base/db/consumer/publicServiceAllocation/publicConsumer.js
View file @
6b6406ff
const
system
=
require
(
"../../../system"
);
const
ConsumerBase
=
require
(
"../../consumer.base"
);
const
ConsumerBase
=
require
(
"../../consumer.base"
);
class
PublicConsumer
extends
ConsumerBase
{
class
PublicConsumer
extends
ConsumerBase
{
constructor
()
{
constructor
()
{
super
(
ConsumerBase
.
getServiceName
(
PublicConsumer
));
super
(
ConsumerBase
.
getServiceName
(
PublicConsumer
));
this
.
esUtils
=
system
.
getObject
(
"util.esUtils"
);
}
}
async
subBeforeConsumer
(
queuedName
,
actionBody
)
{
async
subBeforeConsumer
(
queuedName
,
actionBody
)
{
console
.
log
(
"前置操作......"
,
this
.
serviceName
);
console
.
log
(
"前置操作......"
,
this
.
serviceName
);
...
@@ -15,6 +17,15 @@ class PublicConsumer extends ConsumerBase {
...
@@ -15,6 +17,15 @@ class PublicConsumer extends ConsumerBase {
requestId
:
actionBody
.
requestId
requestId
:
actionBody
.
requestId
}
}
var
execResult
=
await
this
.
execPostByTimeOut
(
params
,
actionBody
.
pushUrl
);
var
execResult
=
await
this
.
execPostByTimeOut
(
params
,
actionBody
.
pushUrl
);
var
tmpBody
=
{
"opTitle"
:
"队列推送数据记录"
,
// N 操作的业务标题
"identifyCode"
:
actionBody
.
identifyCode
||
""
,
// Y 操作的业务标识
"indexName"
:
"push-logs"
,
// Y es索引值,同一个项目用一个值
"messageBody"
:
params
,
"resultInfo"
:
execResult
,
//返回信息
"errorInfo"
:
""
//错误信息
}
this
.
esUtils
.
addEsLogs
(
queuedName
,
tmpBody
);
return
execResult
;
return
execResult
;
}
}
}
}
...
...
brg-queue-center/app/config/localsettings.js
0 → 100755
View file @
6b6406ff
var
settings
=
{
redis
:
{
host
:
"43.247.184.32"
,
port
:
8967
,
password
:
"Gongsibao2018"
,
db
:
1
,
},
database
:
{
dbname
:
"tx-queue-log"
,
user
:
"write"
,
password
:
"write"
,
config
:
{
host
:
'43.247.184.35'
,
port
:
8899
,
dialect
:
'mysql'
,
operatorsAliases
:
false
,
pool
:
{
min
:
0
,
max
:
50
,
idle
:
30000
,
//断开连接后,连接实例在连接池保持的时间
acquire
:
30000
,
//请求超时时间
evict
:
30000
,
handleDisconnects
:
true
},
timezone
:
'+08:00'
,
debug
:
false
,
dialectOptions
:
{
requestTimeout
:
999999
,
// timezone: '+8:00'
// instanceName:'DEV'
}
//设置MSSQL超时时间
}
},
reqEsDevUrl
:
"http://192.168.4.249:9200/"
,
reqHomePageDevUrl
:
"http://zcchannel.apps.com:4003/"
,
reqAuthUrl
:
"http://sj.app.com:4002/auth"
};
module
.
exports
=
settings
;
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