diff --git a/lib/tasks/pool.rake b/lib/tasks/pool.rake new file mode 100644 index 0000000..a428a88 --- /dev/null +++ b/lib/tasks/pool.rake @@ -0,0 +1,13 @@ +namespace :pool do + desc 'Send new pool parameters to upstream schedules' + task apply_upstream: :environment do + # update the config files for all the deployed clients + for host in Host.where(status: Host::STATUSES[:deployed]) do + puts "sending: #{host.name}" + BaculaHandler.new(host).send(:send_config) + end + + # reload bacula + BaculaHandler.new(host).send(:reload_bacula) if host + end +end