Skip to content

Commit

Permalink
Merge pull request #273 from farhatahmad/panic
Browse files Browse the repository at this point in the history
Fixed issue causing panic task to reenable disabled servers
  • Loading branch information
farhatahmad authored Jul 8, 2020
2 parents 2382b01 + c15dd79 commit 75a4d01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/tasks/servers.rake
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ namespace :servers do
end

desc 'Mark a BigBlueButton server as unavailable, and clear all meetings from it'
task :panic, [:id, :keep_enabled] => :environment do |_t, args|
args.with_defaults(keep_enabled: false)
task :panic, [:id, :keep_state] => :environment do |_t, args|
args.with_defaults(keep_state: false)
include ApiHelper

server = Server.find(args.id)
server.enabled = args.keep_enabled
server.enabled = false unless args.keep_state
server.save!

meetings = Meeting.all.select { |m| m.server_id == server.id }
Expand Down

0 comments on commit 75a4d01

Please sign in to comment.