Skip to content

Commit

Permalink
Add parallel to gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
egiurleo committed Apr 8, 2022
1 parent cdaf17a commit 5a80e9b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions Gemfile.lock
Expand Up @@ -10,6 +10,7 @@ PATH
specs:
tapioca (0.7.0)
bundler (>= 1.17.3)
parallel (>= 1.21.0)
pry (>= 0.12.2)
rbi (~> 0.0.0, >= 0.0.14)
sorbet-static-and-runtime (>= 0.5.9204)
Expand Down
4 changes: 0 additions & 4 deletions lib/tapioca/executor.rb
Expand Up @@ -20,10 +20,6 @@ def initialize(queue, number_of_workers: nil)
number_of_workers || [Etc.nprocessors, (queue.length.to_f / MINIMUM_ITEMS_PER_WORKER).ceil].min,
Integer
)

# The number of items that will be processed per worker, so that we can split the queue into groups and assign
# them to each one of the workers
@items_per_worker = T.let((queue.length.to_f / @number_of_workers).ceil, Integer)
end

sig do
Expand Down
1 change: 1 addition & 0 deletions tapioca.gemspec
Expand Up @@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
spec.metadata["allowed_push_host"] = "https://rubygems.org"

spec.add_dependency("bundler", ">= 1.17.3")
spec.add_dependency("parallel", ">= 1.21.0")
spec.add_dependency("pry", ">= 0.12.2")
spec.add_dependency("rbi", "~> 0.0.0", ">= 0.0.14")
spec.add_dependency("sorbet-static-and-runtime", ">= 0.5.9204")
Expand Down

0 comments on commit 5a80e9b

Please sign in to comment.