fix export large set of bulletin overflow issue
This commit is contained in:
parent
76a1f819c9
commit
0754bfad3e
|
@ -186,7 +186,7 @@ class Admin::AnnouncementsController < OrbitAdminController
|
||||||
end
|
end
|
||||||
Thread.new do
|
Thread.new do
|
||||||
begin
|
begin
|
||||||
@announcements = Bulletin.all.desc(:created_at)
|
@announcements = Bulletin.all.desc(:id)
|
||||||
last_updated = [Bulletin.max(:updated_at).to_i, AnnouncementSetting.max(:updated_at).to_i].max
|
last_updated = [Bulletin.max(:updated_at).to_i, AnnouncementSetting.max(:updated_at).to_i].max
|
||||||
filename = "public/announcement_export_#{last_updated}.xlsx"
|
filename = "public/announcement_export_#{last_updated}.xlsx"
|
||||||
if File.exist?(filename)
|
if File.exist?(filename)
|
||||||
|
|
Loading…
Reference in New Issue