Skip to content

Commit

Permalink
Addresses PR feedback
Browse files Browse the repository at this point in the history
* Streamlined a comment in the code
* Removed unneeded gemspec developer_dependencies that we get handled
  via the upgrade to Rails 7.1.4.1
* Added a gemspec version dependency required for keyword argument
  support
* Rebase to main
  • Loading branch information
hms committed Dec 3, 2024
1 parent a152f26 commit 17c4cd5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
14 changes: 5 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,13 @@ GEM
connection_pool (2.4.1)
crass (1.0.6)
date (3.4.1)
debug (1.7.1)
irb (>= 1.5.0)
reline (>= 0.3.1)
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
drb (2.2.1)
erubi (1.13.0)
et-orbi (1.2.11)
tzinfo
fiddle (1.1.2)
fugit (1.11.1)
et-orbi (~> 1, >= 1.2.11)
raabro (~> 1.4)
Expand All @@ -76,7 +75,7 @@ GEM
reline (>= 0.4.2)
json (2.8.2)
language_server-protocol (3.17.0.3)
logger (1.6.0)
logger (1.6.2)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand All @@ -93,7 +92,6 @@ GEM
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
ostruct (0.6.0)
parallel (1.26.3)
parser (3.3.6.0)
ast (~> 2.4.1)
Expand Down Expand Up @@ -186,12 +184,10 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
debug
fiddle
debug (~> 1.9)
logger
mocha
mysql2
ostruct
pg
puma
rdoc
Expand Down
8 changes: 3 additions & 5 deletions lib/solid_queue/processes/interruptible.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ def interrupt
end

def interruptible_sleep(time)
# Since this is invoked on the main thread, using some form of Async
# avoids a 35% slowdown (at least when running the test suite).
#
# Using Futures for architectural consistency with all the other Async in SolidQueue.
# Invoking from the main thread can result in a 35% slowdown (at least when running the test suite).
# Using some form of Async (Futures) addresses this performance issue.
Concurrent::Promises.future(time) do |timeout|
if timeout > 0 && queue.pop(timeout:)
queue.clear # exiting the poll wait guarantees testing for SHUTDOWN before next poll
queue.clear
end
end.value
end
Expand Down
6 changes: 2 additions & 4 deletions solid_queue.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@ Gem::Specification.new do |spec|
spec.add_dependency "fugit", "~> 1.11.0"
spec.add_dependency "thor", "~> 1.3.1"

spec.add_development_dependency "debug"
spec.add_development_dependency "debug", "~> 1.9"
spec.add_development_dependency "mocha"
spec.add_development_dependency "puma"
spec.add_development_dependency "mysql2"
spec.add_development_dependency "pg"
spec.add_development_dependency "sqlite3"
spec.add_development_dependency "rubocop-rails-omakase"
spec.add_development_dependency "ostruct"
spec.add_development_dependency "logger"
spec.add_development_dependency "fiddle"
spec.add_development_dependency "rdoc"
spec.add_development_dependency "logger"
end

0 comments on commit 17c4cd5

Please sign in to comment.