This commit is contained in:
BoHung Chiu 2022-05-28 17:43:11 +08:00
parent 7fd1c7765f
commit 150dd36cac
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ class Admin::EPaperSubscribersController < OrbitAdminController
subscribe_sheet = workbook['Subscribe']
unsubscribe_sheet = workbook['Unsubscribe']
all_count = (subscribe_sheet ? (subscribe_sheet.count - 1) : 0) + (unsubscribe_sheet ? (unsubscribe_sheet.count - 1) : 0)
puts_every_count = all_count * 3 / 100
puts_every_count = [all_count * 3 / 100, 1].max
current_count = 0
finish_percent = 0
thread.update(:status=>{:status=>'Importing','all_count'=>all_count,'current_count'=>current_count,'finish_percent'=>finish_percent})
@ -145,7 +145,7 @@ class Admin::EPaperSubscribersController < OrbitAdminController
end
if subscriber_ids
all_count = subscriber_ids.count
puts_every_count = all_count * 3 / 100
puts_every_count = [all_count * 3 / 100, 1].max
current_count = 0
finish_percent = 0
thread.update(:status=>{:status=>'Deleting','all_count'=>all_count,'current_count'=>current_count,'finish_percent'=>finish_percent})