Skip to content

Commit

Permalink
fix: handle RecordNotFound with exit status 1 in rake servers (#1007)
Browse files Browse the repository at this point in the history
  • Loading branch information
scouillard authored Aug 10, 2023
1 parent feba408 commit 1aa21c6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/tasks/servers.rake
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ namespace :servers do
puts('OK')
rescue ApplicationRedisRecord::RecordNotFound
puts("ERROR: No server found with id: #{args.id}")
exit(1)
end

desc 'Remove a BigBlueButton server'
Expand All @@ -65,6 +66,7 @@ namespace :servers do
puts('OK')
rescue ApplicationRedisRecord::RecordNotFound
puts("ERROR: No server found with id: #{args.id}")
exit(1)
end

desc 'Mark a BigBlueButton server as available for scheduling new meetings'
Expand All @@ -75,6 +77,7 @@ namespace :servers do
puts('OK')
rescue ApplicationRedisRecord::RecordNotFound
puts("ERROR: No server found with id: #{args.id}")
exit(1)
end

desc 'Mark a BigBlueButton server as cordoned to stop scheduling new meetings but consider for
Expand All @@ -86,6 +89,7 @@ namespace :servers do
puts('OK')
rescue ApplicationRedisRecord::RecordNotFound
puts("ERROR: No server found with id: #{args.id}")
exit(1)
end

desc 'Mark a BigBlueButton server as unavailable to stop scheduling new meetings'
Expand Down Expand Up @@ -117,6 +121,7 @@ namespace :servers do
puts('OK')
rescue ApplicationRedisRecord::RecordNotFound
puts("ERROR: No server found with id: #{args.id}")
exit(1)
end

desc 'Mark a BigBlueButton server as unavailable, and clear all meetings from it'
Expand All @@ -142,6 +147,7 @@ namespace :servers do
puts('OK')
rescue ApplicationRedisRecord::RecordNotFound
puts("ERROR: No server found with id: #{args.id}")
exit(1)
end

desc 'Set the load-multiplier of a BigBlueButton server'
Expand All @@ -160,6 +166,7 @@ namespace :servers do
puts('OK')
rescue ApplicationRedisRecord::RecordNotFound
puts("ERROR: No server found with id: #{args.id}")
exit(1)
end

desc 'Adds multiple BigBlueButton servers defined in a YAML file passed as an argument'
Expand Down

0 comments on commit 1aa21c6

Please sign in to comment.