Skip to content

Commit

Permalink
Actually sleep.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpendragon committed Sep 14, 2023
1 parent cfe6ec6 commit 65b184f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/valkyrie/storage/fedora.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ def upload_version(id:, file:)
uri = fedora_identifier(id: id)
# Auto versioning is on, so have to sleep if it's too soon after last
# upload.
if fedora_version == 6
return upload_version(id: id, file: file) if current_version_id(id: id).to_s.split("/").last == Time.current.utc.strftime("%Y%m%d%H%M%S")
if fedora_version == 6 && current_version_id(id: id).to_s.split("/").last == Time.current.utc.strftime("%Y%m%d%H%M%S")
sleep(0.5)
return upload_version(id: id, file: file)
end
upload_file(fedora_uri: uri, io: file)
version_id = mint_version(uri, latest_version(uri))
Expand Down

0 comments on commit 65b184f

Please sign in to comment.