Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrunberg committed Jan 3, 2025
1 parent 5a76d64 commit 184f0b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/sidekiq/heroku_autoscale/poll_interval.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ def poll!
@pool.post do
::Sidekiq.logger.warn "Polling #{@method_name} processes. Request queued: #{@requests.size}"
while @requests.size > 0
::Sidekiq.logger.warn "Polling #{@method_name} processes. Waiting for the semaphore."
# Copy the requests, let the main thread continue to add new requests
@semaphore.synchronize do
::Sidekiq.logger.warn "Polling #{@method_name} processes. Moving stuff to work queue."
work = @requests.dup
work.keys.each { |key| @requests.delete(key) }
end
Expand Down

0 comments on commit 184f0b3

Please sign in to comment.