Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Greenlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arbeitsgruppe Hardwarenahe IT-Systeme
Greenlight
Commits
1f2ef10d
Unverified
Commit
1f2ef10d
authored
3 years ago
by
Ahmad Farhat
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed issue with All Recordings not returning all recordings if user has too many rooms (#2896)
parent
c0e19f23
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/concerns/populator.rb
+4
-3
4 additions, 3 deletions
app/controllers/concerns/populator.rb
app/controllers/concerns/recorder.rb
+1
-1
1 addition, 1 deletion
app/controllers/concerns/recorder.rb
with
5 additions
and
4 deletions
app/controllers/concerns/populator.rb
+
4
−
3
View file @
1f2ef10d
...
@@ -90,7 +90,8 @@ module Populator
...
@@ -90,7 +90,8 @@ module Populator
# Returns exactly 1 page of the latest recordings
# Returns exactly 1 page of the latest recordings
def
latest_recordings
def
latest_recordings
return_length
=
Rails
.
configuration
.
pagination_number
return_length
=
Rails
.
configuration
.
pagination_rows
number_of_rooms
=
Rails
.
configuration
.
pagination_number
recordings
=
[]
recordings
=
[]
counter
=
0
counter
=
0
...
@@ -100,8 +101,8 @@ module Populator
...
@@ -100,8 +101,8 @@ module Populator
Room
.
includes
(
:owner
)
Room
.
includes
(
:owner
)
.
where
(
users:
{
provider:
@user_domain
})
.
where
(
users:
{
provider:
@user_domain
})
.
order
(
last_session: :desc
)
.
order
(
last_session: :desc
)
.
limit
(
return_length
)
.
limit
(
number_of_rooms
)
.
offset
(
counter
*
return_length
)
.
offset
(
counter
*
number_of_rooms
)
.
pluck
(
:bbb_id
)
.
pluck
(
:bbb_id
)
else
else
Room
.
order
(
last_session: :desc
)
Room
.
order
(
last_session: :desc
)
...
...
This diff is collapsed.
Click to expand it.
app/controllers/concerns/recorder.rb
+
1
−
1
View file @
1f2ef10d
...
@@ -37,7 +37,7 @@ module Recorder
...
@@ -37,7 +37,7 @@ module Recorder
def
all_recordings
(
room_bbb_ids
,
search_params
=
{},
ret_search_params
=
false
,
search_name
=
false
)
def
all_recordings
(
room_bbb_ids
,
search_params
=
{},
ret_search_params
=
false
,
search_name
=
false
)
res
=
{
recordings:
[]
}
res
=
{
recordings:
[]
}
until
room_bbb_ids
.
empty?
||
res
[
:recordings
].
length
>
Rails
.
configuration
.
pagination_number
until
room_bbb_ids
.
empty?
# bbb.get_recordings returns an object
# bbb.get_recordings returns an object
# take only the array portion of the object that is returned
# take only the array portion of the object that is returned
full_res
=
get_multiple_recordings
(
room_bbb_ids
.
pop
(
Rails
.
configuration
.
pagination_number
))
full_res
=
get_multiple_recordings
(
room_bbb_ids
.
pop
(
Rails
.
configuration
.
pagination_number
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment