From c73e22dd357421aa755eb530a95d0bf0b13fd29e Mon Sep 17 00:00:00 2001 From: Andrew Becker Date: Thu, 3 Oct 2019 12:26:34 -0400 Subject: [PATCH] Adding an automate retry to check_satellite_build_completed.rb (#98) --- .../__methods__/check_satellite_build_completed.rb | 4 +++- .../__methods__/check_satellite_build_completed.yaml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Automate/RedHatConsulting_Satellite6/Integration/Satellite/Operations/Methods.class/__methods__/check_satellite_build_completed.rb b/Automate/RedHatConsulting_Satellite6/Integration/Satellite/Operations/Methods.class/__methods__/check_satellite_build_completed.rb index 32e1984..584e16c 100644 --- a/Automate/RedHatConsulting_Satellite6/Integration/Satellite/Operations/Methods.class/__methods__/check_satellite_build_completed.rb +++ b/Automate/RedHatConsulting_Satellite6/Integration/Satellite/Operations/Methods.class/__methods__/check_satellite_build_completed.rb @@ -72,5 +72,7 @@ def get_satellite_api() $evm.root['ae_result'] = 'ok' end rescue => err - error("[#{err}]\n#{err.backtrace.join("\n")}") + $evm.log(:error, "Error checking build status: #{err.message}") + $evm.root['ae_result'] = 'retry' + $evm.root['ae_retry_interval'] = '30.seconds' end diff --git a/Automate/RedHatConsulting_Satellite6/Integration/Satellite/Operations/Methods.class/__methods__/check_satellite_build_completed.yaml b/Automate/RedHatConsulting_Satellite6/Integration/Satellite/Operations/Methods.class/__methods__/check_satellite_build_completed.yaml index 6195905..c6857f0 100644 --- a/Automate/RedHatConsulting_Satellite6/Integration/Satellite/Operations/Methods.class/__methods__/check_satellite_build_completed.yaml +++ b/Automate/RedHatConsulting_Satellite6/Integration/Satellite/Operations/Methods.class/__methods__/check_satellite_build_completed.yaml @@ -9,4 +9,5 @@ object: scope: instance language: ruby location: inline + options: {} inputs: []