Skip to content

Commit

Permalink
SL-210: update rake tasks for managing servers and meetings (#708)
Browse files Browse the repository at this point in the history
* SL-210: New rake tasks for managing servers and meetings

* Update poll.rake

Co-authored-by: Jesus Federico <[email protected]>
  • Loading branch information
git-lama and jfederico authored Oct 21, 2021
1 parent 57c093f commit e2eb7ef
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/tasks/poll.rake
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ namespace :poll do

load_min_user_count = Rails.configuration.x.load_min_user_count
x_minutes_ago = Rails.configuration.x.load_join_buffer_time.ago
active_meeting_ids = []
meetings.each do |meeting|
active_meeting_ids << meeting.xpath('.//meetingName').text
created_time = Time.zone.at(meeting.xpath('.//createTime').text.to_i / 1000)
actual_attendees = meeting.xpath('.//participantCount').text.to_i + meeting.xpath('.//moderatorCount').text.to_i
count = meeting.at_xpath('participantCount')
Expand Down Expand Up @@ -86,9 +84,6 @@ namespace :poll do
server.users = server_users
server.largest_meeting = users_in_largest_meeting
server.videos = video_streams
Meeting.all.each do |meeting|
meeting.destroy! if meeting.server_id.eql?(server.id) && active_meeting_ids.exclude?(meeting.id)
end
rescue StandardError => e
Rails.logger.warn("Failed to get server id=#{server.id} status: #{e}")

Expand Down

0 comments on commit e2eb7ef

Please sign in to comment.