remove puts

This commit is contained in:
chiu 2020-03-01 16:01:57 +08:00
parent c9abece068
commit 5ab900e6e3
2 changed files with 0 additions and 6 deletions

View File

@ -110,7 +110,6 @@ class AnnouncementsController < ApplicationController
end end
def pack_data(is_random=false) def pack_data(is_random=false)
t1 = Time.now
tags = OrbitHelper.widget_tags || [] tags = OrbitHelper.widget_tags || []
cats = OrbitHelper.widget_categories || [] cats = OrbitHelper.widget_categories || []
subpart = OrbitHelper.get_current_widget subpart = OrbitHelper.get_current_widget
@ -153,8 +152,6 @@ class AnnouncementsController < ApplicationController
end end
mp = (anns[0]["img_src"] rescue "") mp = (anns[0]["img_src"] rescue "")
mpd = (anns[0]["img_description"] rescue "") mpd = (anns[0]["img_description"] rescue "")
t2 = Time.now
puts ['anns',tags,t2-t1]
{ {
"announcements" => anns, "announcements" => anns,
"extras" => { "extras" => {

View File

@ -115,7 +115,6 @@ module AnnouncementsHelper
} }
end end
def get_sorted_annc def get_sorted_annc
t1 = Time.now
params = OrbitHelper.params params = OrbitHelper.params
locale = OrbitHelper.get_site_locale.to_s locale = OrbitHelper.get_site_locale.to_s
page = Page.where(url:params['url']).first page = Page.where(url:params['url']).first
@ -157,8 +156,6 @@ module AnnouncementsHelper
end end
annc_count = all_filter.count annc_count = all_filter.count
total_pages = page_data_count == 0 ? 1 : (annc_count.to_f / page_data_count).ceil total_pages = page_data_count == 0 ? 1 : (annc_count.to_f / page_data_count).ceil
t2 = Time.now
puts ['get_sorted_annc',t2-t1]
[sorted,total_pages] [sorted,total_pages]
end end
end end