Skip to content

Commit

Permalink
Update project_extension.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkb7 committed Sep 24, 2024
1 parent 9c92ae8 commit 6bd9685
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions omnibus/lib/project_extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def ddwcssign(file)
end.join(" ")

status = shellout(cmd)

if status.exitstatus != 0
log.warn(self.class.name) do
<<-EOH.strip
Expand All @@ -72,20 +71,17 @@ def ddwcssign(file)
#{status.stderr}
EOH
end

# Retry logic: raise error after 3 attempts
if attempts < max_retries
log.info(self.class.name) { "Retrying signing #{file} (Attempt #{attempts + 1})" }
sleep(delay)
retry
else
raise "Failed to sign with dd-wcs after #{max_retries} attempts"
end
raise "Failed to sign with dd-wcs"
else
log.info(self.class.name) { "Successfully signed #{file} after #{attempts} attempt(s)" }
end
rescue => e
log.error(self.class.name) { "Error during signing: #{e.message}" }
# Retry logic: raise error after 3 attempts
if attempts < max_retries
log.info(self.class.name) { "Retrying signing #{file} (Attempt #{attempts + 1})" }
sleep(delay)
retry
end
raise "Failed to sign with dd-wcs: #{e.message}"
end
end
Expand Down

0 comments on commit 6bd9685

Please sign in to comment.