From 3d9f5e20c6c1f32b482a80898d207dabaa0bb739 Mon Sep 17 00:00:00 2001 From: albert Date: Sun, 17 Feb 2013 01:03:28 -0500 Subject: [PATCH] remove db timeouts for mod report --- app/logical/moderator/dashboard/report.rb | 40 +++++++++++++++++------ 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/app/logical/moderator/dashboard/report.rb b/app/logical/moderator/dashboard/report.rb index 0bdcd265e..a24ca5000 100644 --- a/app/logical/moderator/dashboard/report.rb +++ b/app/logical/moderator/dashboard/report.rb @@ -9,43 +9,63 @@ module Moderator end def artists - Queries::Artist.all(min_date, max_level) + ActiveRecord::Base.without_timeout do + Queries::Artist.all(min_date, max_level) + end end def comments - Queries::Comment.all(min_date, max_level) + ActiveRecord::Base.without_timeout do + Queries::Comment.all(min_date, max_level) + end end def mod_actions - Queries::ModAction.all + ActiveRecord::Base.without_timeout do + Queries::ModAction.all + end end def notes - Queries::Note.all(min_date, max_level) + ActiveRecord::Base.without_timeout do + Queries::Note.all(min_date, max_level) + end end def appeals - Queries::PostAppeal.all(min_date) + ActiveRecord::Base.without_timeout do + Queries::PostAppeal.all(min_date) + end end def flags - Queries::PostFlag.all(min_date) + ActiveRecord::Base.without_timeout do + Queries::PostFlag.all(min_date) + end end def tags - Queries::Tag.all(min_date, max_level) + ActiveRecord::Base.without_timeout do + Queries::Tag.all(min_date, max_level) + end end def posts - Queries::Upload.all(min_date, max_level) + ActiveRecord::Base.without_timeout do + Queries::Upload.all(min_date, max_level) + end end def user_feedbacks - Queries::UserFeedback.all + ActiveRecord::Base.without_timeout do + Queries::UserFeedback.all + end end def wiki_pages - Queries::WikiPage.all(min_date, max_level) + ActiveRecord::Base.without_timeout do + Queries::WikiPage.all(min_date, max_level) + end end end end