Commit bbfc69660c9899304cc5fb21f5b3dbc9d3e2cf18
Exists in
master
and in
29 other branches
Merge branch 'defer-page-hit' into 'master'
content_viewer: defer @page.hit yeah, now we have unicorn for that :) See merge request !678
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
app/controllers/public/content_viewer_controller.rb
... | ... | @@ -39,7 +39,10 @@ class ContentViewerController < ApplicationController |
39 | 39 | end |
40 | 40 | |
41 | 41 | # At this point the page will be showed |
42 | - @page.hit unless user_is_a_bot? || already_visited?(@page) | |
42 | + | |
43 | + unless user_is_a_bot? || already_visited?(@page) | |
44 | + Noosfero::Scheduler::Defer.later{ @page.hit } | |
45 | + end | |
43 | 46 | |
44 | 47 | @page = FilePresenter.for @page |
45 | 48 | ... | ... |