Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cs_comments_service
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
cs_comments_service
Commits
8cec6a36
Commit
8cec6a36
authored
Oct 29, 2013
by
jimabramson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log some identity-map-related stats, if enabled
parent
31ef160d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
app.rb
+15
-0
No files found.
app.rb
View file @
8cec6a36
...
@@ -66,6 +66,21 @@ if RACK_ENV.to_s != "test" # disable api_key auth in test environment
...
@@ -66,6 +66,21 @@ if RACK_ENV.to_s != "test" # disable api_key auth in test environment
end
end
end
end
if
ENV
[
"ENABLE_IDMAP_LOGGING"
]
after
do
idmap
=
Mongoid
::
Threaded
.
identity_map
vals
=
{
"pid"
=>
Process
.
pid
,
"dyno"
=>
ENV
[
"DYNO"
],
"request_id"
=>
params
[
:request_id
]
}
idmap
.
each
{
|
k
,
v
|
vals
[
"idmap_count_
#{
k
.
to_s
}
"
]
=
v
.
size
}
logger
.
info
vals
.
map
{
|
e
|
e
.
join
(
"="
)
}.
join
(
" "
)
end
end
# Enable the identity map. The middleware ensures that the identity map is
# Enable the identity map. The middleware ensures that the identity map is
# cleared for every request.
# cleared for every request.
Mongoid
.
identity_map_enabled
=
true
Mongoid
.
identity_map_enabled
=
true
...
...
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