Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
4f1bb55e
Unverified
Commit
4f1bb55e
authored
Oct 27, 2023
by
Athurg Gooth
Committed by
GitHub
Oct 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: metric env not affect (#2450)
fix metric env not affect
parent
20d3abb9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
memos.go
cmd/memos.go
+5
-1
profile.go
server/profile/profile.go
+2
-0
No files found.
cmd/memos.go
View file @
4f1bb55e
...
...
@@ -66,9 +66,12 @@ var (
return
}
if
enableMetric
{
if
profile
.
Metric
{
println
(
"metric collection is enabled"
)
// nolint
metric
.
NewMetricClient
(
s
.
ID
,
*
profile
)
}
else
{
println
(
"metric collection is disabled"
)
}
c
:=
make
(
chan
os
.
Signal
,
1
)
...
...
@@ -169,6 +172,7 @@ func initConfig() {
println
(
"mode:"
,
profile
.
Mode
)
println
(
"driver:"
,
profile
.
Driver
)
println
(
"version:"
,
profile
.
Version
)
println
(
"metric:"
,
profile
.
Metric
)
println
(
"---"
)
}
...
...
server/profile/profile.go
View file @
4f1bb55e
...
...
@@ -30,6 +30,8 @@ type Profile struct {
Driver
string
`json:"-"`
// Version is the current version of server
Version
string
`json:"version"`
// Metric indicate the metric collection is enabled or not
Metric
bool
`json:"-"`
}
func
(
p
*
Profile
)
IsDev
()
bool
{
...
...
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