Skip to content

Commit

Permalink
atom feed retry
Browse files Browse the repository at this point in the history
  • Loading branch information
terrywbrady committed Sep 25, 2023
1 parent 999e1bb commit 5122a75
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/controllers/object_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@ def upload
# rubocop:enable Lint/RescueException

def recent
retries = 0
begin
do_recent
rescue StandardError => e
# :nocov:
retries += 1
retries > RETRY_LIMIT ? raise(e) : retry
# :nocov:
end
end

def do_recent
@collection_ark = params[:collection]
collection = InvCollection.where(ark: @collection_ark).first
render(status: 404, plain: '404 Not Found') && return if collection.nil? || collection.to_s == ''
Expand Down

0 comments on commit 5122a75

Please sign in to comment.