Fix bug.
This commit is contained in:
parent
7fd1c7765f
commit
150dd36cac
|
@ -58,7 +58,7 @@ class Admin::EPaperSubscribersController < OrbitAdminController
|
||||||
subscribe_sheet = workbook['Subscribe']
|
subscribe_sheet = workbook['Subscribe']
|
||||||
unsubscribe_sheet = workbook['Unsubscribe']
|
unsubscribe_sheet = workbook['Unsubscribe']
|
||||||
all_count = (subscribe_sheet ? (subscribe_sheet.count - 1) : 0) + (unsubscribe_sheet ? (unsubscribe_sheet.count - 1) : 0)
|
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
|
current_count = 0
|
||||||
finish_percent = 0
|
finish_percent = 0
|
||||||
thread.update(:status=>{:status=>'Importing','all_count'=>all_count,'current_count'=>current_count,'finish_percent'=>finish_percent})
|
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
|
end
|
||||||
if subscriber_ids
|
if subscriber_ids
|
||||||
all_count = subscriber_ids.count
|
all_count = subscriber_ids.count
|
||||||
puts_every_count = all_count * 3 / 100
|
puts_every_count = [all_count * 3 / 100, 1].max
|
||||||
current_count = 0
|
current_count = 0
|
||||||
finish_percent = 0
|
finish_percent = 0
|
||||||
thread.update(:status=>{:status=>'Deleting','all_count'=>all_count,'current_count'=>current_count,'finish_percent'=>finish_percent})
|
thread.update(:status=>{:status=>'Deleting','all_count'=>all_count,'current_count'=>current_count,'finish_percent'=>finish_percent})
|
||||||
|
|
Loading…
Reference in New Issue