Skip to content

Commit

Permalink
Add a few style related fixes across the board
Browse files Browse the repository at this point in the history
  • Loading branch information
rosa committed Nov 23, 2023
1 parent 9d0da03 commit 49f7d13
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/solid_queue/blocked_execution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class BlockedExecution < SolidQueue::Execution

class << self
def unblock(count)
release_many releasable.select(:concurrency_key).distinct.limit(count).pluck(:concurrency_key)
release_many releasable.distinct.limit(count).pluck(:concurrency_key)
end

def release_many(concurrency_keys)
Expand Down
2 changes: 1 addition & 1 deletion app/models/solid_queue/claimed_execution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def perform
failed_with(result.error)
end
ensure
job.unblock_blocked_jobs
job.unblock_next_blocked_job
end

def release
Expand Down
2 changes: 1 addition & 1 deletion app/models/solid_queue/job/concurrency_controls.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module ConcurrencyControls
delegate :concurrency_limit, :concurrency_duration, to: :job_class
end

def unblock_blocked_jobs
def unblock_next_blocked_job
if release_concurrency_lock
release_next_blocked_job
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/solid_queue/scheduled_execution.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class SolidQueue::ScheduledExecution < SolidQueue::Execution
scope :due, -> { where("scheduled_at <= ?", Time.current) }
scope :due, -> { where(scheduled_at: ..Time.current) }
scope :ordered, -> { order(scheduled_at: :asc, priority: :asc) }
scope :next_batch, ->(batch_size) { due.ordered.limit(batch_size) }

Expand Down

0 comments on commit 49f7d13

Please sign in to comment.