Skip to content

Commit

Permalink
retry
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmeurer committed Mar 20, 2024
1 parent 994e541 commit 2cb20b6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/services/gemmies/update_dependencies_and_versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
module Gemmies
class UpdateDependenciesAndVersions < Baseline::Service
def call(gemmy)
versions = Gems
.versions(gemmy.name)
.select { _1.fetch("platform") == "ruby" }
.map { _1.fetch "number" }
versions = Octopoller.poll retries: 5 do
Gems
.versions(gemmy.name)
.select { _1.fetch("platform") == "ruby" }
.map { _1.fetch "number" }
rescue Gems::GemError
:re_poll
end

deps = versions.each_with_object({}) do |version, hash|
cache_key = [
Expand Down

0 comments on commit 2cb20b6

Please sign in to comment.