Follow up for issue #1995 - Missing DB index on article columns queried by ticket waiting time report backend - limit the max. ticket count to 20_000 each day.
This commit is contained in:
parent
9379d7afe6
commit
6e899948c1
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ class Stats::TicketWaitingTime
|
||||||
|
|
||||||
own_waiting = []
|
own_waiting = []
|
||||||
all_waiting = []
|
all_waiting = []
|
||||||
Ticket.where('group_id IN (?) AND updated_at > ?', group_ids.sort, Time.zone.today).pluck(:id, :owner_id).each do |ticket|
|
Ticket.where('group_id IN (?) AND updated_at > ?', group_ids.sort, Time.zone.today).limit(20_000).pluck(:id, :owner_id).each do |ticket|
|
||||||
all_waiting.push ticket[0]
|
all_waiting.push ticket[0]
|
||||||
if ticket[1] == user.id
|
if ticket[1] == user.id
|
||||||
own_waiting.push ticket[0]
|
own_waiting.push ticket[0]
|
||||||
|
|
Loading…
Reference in a new issue