BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
3a227b5a
Commit
3a227b5a
authored
Dec 28, 2015
by
Yorick Peterse
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'influxdb-missing-settings' into 'master'
Handle missing settings table for metrics See merge request !2232
parents
03451a25
ed214a11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
metrics.rb
lib/gitlab/metrics.rb
+10
-6
metrics_spec.rb
spec/lib/gitlab/metrics_spec.rb
+1
-1
No files found.
lib/gitlab/metrics.rb
View file @
3a227b5a
...
...
@@ -9,12 +9,16 @@ module Gitlab
# etc). This ensures the application is able to boot up even when the
# migrations have not been executed.
def
self
.
settings
ApplicationSetting
.
current
||
{
metrics_pool_size:
16
,
metrics_timeout:
10
,
metrics_enabled:
false
,
metrics_method_call_threshold:
10
}
if
ApplicationSetting
.
table_exists?
and
curr
=
ApplicationSetting
.
current
curr
else
{
metrics_pool_size:
16
,
metrics_timeout:
10
,
metrics_enabled:
false
,
metrics_method_call_threshold:
10
}
end
end
def
self
.
pool_size
...
...
spec/lib/gitlab/metrics_spec.rb
View file @
3a227b5a
...
...
@@ -29,7 +29,7 @@ describe Gitlab::Metrics do
it
'returns an Array containing a file path and line number'
do
file
,
line
=
described_class
.
last_relative_application_frame
expect
(
line
).
to
eq
(
30
)
expect
(
line
).
to
eq
(
__LINE__
-
2
)
expect
(
file
).
to
eq
(
'spec/lib/gitlab/metrics_spec.rb'
)
end
end
...
...
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