ticket_overview_select.rb 796 B

12345678910111213141516171819202122232425
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Sessions::Event::TicketOverviewSelect < Sessions::Event::Base
  3. =begin
  4. Observing every ticket overview of each agent session does not scale well on larger systems (e.g. 60 ticket overviews per agent).
  5. With this change, only the five most recently used ones are checked on every iteration.
  6. A full check is still performed (every 60 seconds). This reduces the overall load.
  7. App.WebSocket.send({event:'ticket_overview_select'}, data: { view: ''})
  8. =end
  9. def run
  10. return if @payload['data'].blank?
  11. return if @payload['data']['view'].blank?
  12. return if @session['id'].blank?
  13. Sessions::Backend::TicketOverviewList.overview_history_append(@payload['data']['view'], @session['id'])
  14. nil
  15. end
  16. end