From 1aa21c666db8e393bff43c617be2ca932482e213 Mon Sep 17 00:00:00 2001 From: Samuel Couillard <43917914+scouillard@users.noreply.github.com> Date: Thu, 10 Aug 2023 12:15:05 -0400 Subject: [PATCH] fix: handle RecordNotFound with exit status 1 in rake servers (#1007) --- lib/tasks/servers.rake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/tasks/servers.rake b/lib/tasks/servers.rake index 26ae8e43..1db8aaf4 100644 --- a/lib/tasks/servers.rake +++ b/lib/tasks/servers.rake @@ -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' @@ -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' @@ -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 @@ -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' @@ -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' @@ -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' @@ -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'