Skip to content

Commit

Permalink
Order both by priority and job_id, to ensure deterministic ordering
Browse files Browse the repository at this point in the history
When all priorities are the same.
  • Loading branch information
rosa committed Nov 22, 2023
1 parent 2b8f732 commit 3b76e75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/solid_queue/ready_execution.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module SolidQueue
class ReadyExecution < Execution
scope :queued_as, ->(queue_name) { where(queue_name: queue_name) }
scope :ordered, -> { order(priority: :asc) }
scope :ordered, -> { order(priority: :asc, job_id: :asc) }

assume_attributes_from_job

Expand Down

0 comments on commit 3b76e75

Please sign in to comment.