Commit 18dcc05848a3be6dda03f70dc8a67f5590d6f289
1 parent
68c659ec
Exists in
master
and in
21 other branches
content_viewer: defer @page.hit
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,7 +39,10 @@ class ContentViewerController < ApplicationController | ||
39 | end | 39 | end |
40 | 40 | ||
41 | # At this point the page will be showed | 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 | @page = FilePresenter.for @page | 47 | @page = FilePresenter.for @page |
45 | 48 |