GRN2-277: Optimize server recordings to make it useable for large deployments (#2411)

* First changes to server recordings

* Update server recordings

* Rubocop

* Make sure to return nothing for empty searches

* Made sure exactly the right amount of recordings are returned

* Added test cases
This commit is contained in:
Ahmad Farhat
2021-01-12 17:36:51 -05:00
committed by GitHub
parent 9cd08dab54
commit 2b0a80c7eb
13 changed files with 102 additions and 15 deletions

View File

@ -37,7 +37,7 @@ module Recorder
def all_recordings(room_bbb_ids, search_params = {}, ret_search_params = false, search_name = false)
res = { recordings: [] }
until room_bbb_ids.empty?
until room_bbb_ids.empty? || res[:recordings].length > Rails.configuration.pagination_number
# bbb.get_recordings returns an object
# take only the array portion of the object that is returned
full_res = get_multiple_recordings(room_bbb_ids.pop(Rails.configuration.pagination_number))