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
6bc07855
Commit
6bc07855
authored
Jul 03, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
3317d564
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
brg-queue-center/app/base/db/consumer.base.js
+1
-1
brg-queue-center/app/base/db/consumer/publicServiceAllocation/publicConsumer.js
+3
-1
brg-queue-center/app/base/utils/esUtils.js
+4
-4
No files found.
brg-queue-center/app/base/db/consumer.base.js
View file @
6bc07855
...
@@ -22,7 +22,7 @@ class ConsumerBase {
...
@@ -22,7 +22,7 @@ class ConsumerBase {
}
}
var
self
=
this
;
var
self
=
this
;
this
.
duplicateInstance
.
brpop
(
queuedName
,
3600
,
async
function
(
err
,
repl
)
{
this
.
duplicateInstance
.
brpop
(
queuedName
,
3600
,
async
function
(
err
,
repl
)
{
console
.
log
(
JSON
.
stringify
(
repl
),
".....
.....repl.............."
);
console
.
log
(
JSON
.
stringify
(
repl
),
".....
.........repl.............."
+
queuedName
);
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 @
6bc07855
...
@@ -7,7 +7,7 @@ class PublicConsumer extends ConsumerBase {
...
@@ -7,7 +7,7 @@ class PublicConsumer extends ConsumerBase {
this
.
esUtils
=
system
.
getObject
(
"util.esUtils"
);
this
.
esUtils
=
system
.
getObject
(
"util.esUtils"
);
}
}
async
subBeforeConsumer
(
queuedName
,
actionBody
)
{
async
subBeforeConsumer
(
queuedName
,
actionBody
)
{
console
.
log
(
"前置操作......"
,
this
.
serviceName
);
console
.
log
(
"
publicConsumer
前置操作......"
,
this
.
serviceName
);
}
}
async
subDoConsumer
(
queuedName
,
actionBody
)
{
async
subDoConsumer
(
queuedName
,
actionBody
)
{
var
params
=
{
var
params
=
{
...
@@ -16,7 +16,9 @@ class PublicConsumer extends ConsumerBase {
...
@@ -16,7 +16,9 @@ class PublicConsumer extends ConsumerBase {
actionBody
:
actionBody
.
messageBody
,
actionBody
:
actionBody
.
messageBody
,
requestId
:
actionBody
.
requestId
requestId
:
actionBody
.
requestId
}
}
console
.
log
(
JSON
.
stringify
(
params
),
"publicConsumer推送信息.....actionBody.pushUrl="
+
actionBody
.
pushUrl
)
var
execResult
=
await
this
.
execPostByTimeOut
(
params
,
actionBody
.
pushUrl
);
var
execResult
=
await
this
.
execPostByTimeOut
(
params
,
actionBody
.
pushUrl
);
console
.
log
(
JSON
.
stringify
(
execResult
),
"publicConsumer推送结果.....actionBody.pushUrl="
+
actionBody
.
pushUrl
)
var
tmpBody
=
{
var
tmpBody
=
{
"opTitle"
:
"队列推送数据记录,推送地址:"
+
actionBody
.
pushUrl
,
// N 操作的业务标题
"opTitle"
:
"队列推送数据记录,推送地址:"
+
actionBody
.
pushUrl
,
// N 操作的业务标题
"identifyCode"
:
actionBody
.
identifyCode
||
""
,
// Y 操作的业务标识
"identifyCode"
:
actionBody
.
identifyCode
||
""
,
// Y 操作的业务标识
...
...
brg-queue-center/app/base/utils/esUtils.js
View file @
6bc07855
...
@@ -20,10 +20,10 @@ class EsUtils {
...
@@ -20,10 +20,10 @@ class EsUtils {
esIndexName
=
queuedName
+
(
actionBody
.
indexName
?
"-"
+
actionBody
.
indexName
:
""
);
esIndexName
=
queuedName
+
(
actionBody
.
indexName
?
"-"
+
actionBody
.
indexName
:
""
);
}
}
esIndexName
=
esIndexName
.
toLocaleLowerCase
()
+
"/_doc?pretty"
;
esIndexName
=
esIndexName
.
toLocaleLowerCase
()
+
"/_doc?pretty"
;
actionBody
.
resultInfo
=
typeof
actionBody
.
resultInfo
===
'object'
?
JSON
.
stringify
(
actionBody
.
resultInfo
)
:
actionBody
.
resultInfo
;
actionBody
.
resultInfo
=
typeof
actionBody
.
resultInfo
===
'object'
?
JSON
.
stringify
(
actionBody
.
resultInfo
)
:
actionBody
.
resultInfo
||
""
;
actionBody
.
errorInfo
=
typeof
actionBody
.
errorInfo
===
'object'
?
JSON
.
stringify
(
actionBody
.
errorInfo
)
:
actionBody
.
errorInfo
;
actionBody
.
errorInfo
=
typeof
actionBody
.
errorInfo
===
'object'
?
JSON
.
stringify
(
actionBody
.
errorInfo
)
:
actionBody
.
errorInfo
||
""
;
actionBody
.
messageBody
=
typeof
actionBody
.
messageBody
===
'object'
?
JSON
.
stringify
(
actionBody
.
messageBody
)
:
actionBody
.
messageBody
;
actionBody
.
messageBody
=
typeof
actionBody
.
messageBody
===
'object'
?
JSON
.
stringify
(
actionBody
.
messageBody
)
:
actionBody
.
messageBody
||
""
;
actionBody
.
messageBody
=
actionBody
.
messageBody
+
";actionType="
+
actionBody
.
actionType
+
";pushUrl="
+
actionBody
.
pushUrl
actionBody
.
messageBody
=
(
actionBody
.
messageBody
||
""
)
+
";actionType="
+
(
actionBody
.
actionType
||
""
)
+
";pushUrl="
+
(
actionBody
.
pushUrl
||
""
);
var
params
=
{
var
params
=
{
opTitle
:
moment
().
format
(
"YYYY-MM-DD HH:mm:ss:SSS"
)
+
","
+
actionBody
.
opTitle
||
""
,
opTitle
:
moment
().
format
(
"YYYY-MM-DD HH:mm:ss:SSS"
)
+
","
+
actionBody
.
opTitle
||
""
,
identifyCode
:
actionBody
.
identifyCode
||
""
,
identifyCode
:
actionBody
.
identifyCode
||
""
,
...
...
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