Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
enoch
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DevOps
enoch
Commits
2a5b3323
Commit
2a5b3323
authored
Nov 22, 2019
by
jingbo.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
panic bug修改
parent
87b9e40f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
13 deletions
+17
-13
brave_message_handler.go
service/consumer/brave_message_handler.go
+1
-1
node_check.go
service/node-check/node_check.go
+15
-12
consul.go
service/registry/consul.go
+1
-0
No files found.
service/consumer/brave_message_handler.go
View file @
2a5b3323
...
...
@@ -46,7 +46,7 @@ func msgInfluxProcess(traceMsgs []end_points.TraceMsg) {
}
path
:=
traceMsg
.
Name
if
_
,
ok
:=
httpMethod
[
path
];
ok
{
path
=
traceMsg
.
Tags
.
HttpMethod
+
" "
+
p
ath
path
=
traceMsg
.
Tags
.
HttpMethod
+
" "
+
traceMsg
.
Tags
.
HttpP
ath
}
path
=
strings
.
ToLower
(
path
)
...
...
service/node-check/node_check.go
View file @
2a5b3323
...
...
@@ -131,11 +131,12 @@ func (w watch) UpdateNodes(service *registry.Service) {
newService
:=
registry
.
NewService
(
service
.
Name
)
for
kk
,
vv
:=
range
service
.
NodeMap
{
newNode
:=
registry
.
Node
{
ServiceName
:
vv
.
ServiceName
,
Id
:
vv
.
Id
,
Port
:
vv
.
Port
,
Address
:
vv
.
Address
,
Status
:
vv
.
Status
,
ServiceName
:
vv
.
ServiceName
,
Id
:
vv
.
Id
,
Port
:
vv
.
Port
,
Address
:
vv
.
Address
,
Status
:
vv
.
Status
,
Meta
:
make
(
map
[
string
]
string
),
}
for
x
,
y
:=
range
vv
.
Meta
{
newNode
.
Meta
[
x
]
=
y
...
...
@@ -165,12 +166,14 @@ func InitServiceStatus() {
func
NodeCheck
()
{
defer
func
()
{
/*
if e := recover(); e != nil {
logger
.
Info
(
"node check panic: "
,
e
)
logger.Error
("node check panic: ", e)
_ = ding.SendText("node check panic!", dingding.DefaultDingURL...)
time.Sleep(time.Second * 1)
NodeCheck()
}
*/
}()
//注册器初始化
...
...
service/registry/consul.go
View file @
2a5b3323
...
...
@@ -301,6 +301,7 @@ func (cr *consulRegistry) SetObserver(name string, observer Observer) error {
Port
:
vv
.
Port
,
Address
:
vv
.
Address
,
Status
:
vv
.
Status
,
Meta
:
make
(
map
[
string
]
string
),
}
for
x
,
y
:=
range
vv
.
Meta
{
newNode
.
Meta
[
x
]
=
y
...
...
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