Skip to content

Commit

Permalink
Remove unneeded ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
svevang committed Aug 9, 2023
1 parent bf03880 commit 18af389
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/models/publishing_queue_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ class PublishingQueueItem < ApplicationRecord

scope :latest_attempted, -> {
where(id: PublishingPipelineState.group(:podcast_id).select("max(publishing_queue_item_id)"))
.order(id: :desc)
}
scope :latest_complete, -> {
latest_by_status(PublishingPipelineState::TERMINAL_STATUSES)
Expand All @@ -15,7 +14,7 @@ class PublishingQueueItem < ApplicationRecord
scope :latest_by_status, ->(status) {
where(id: PublishingPipelineState.group(:podcast_id)
.where(status: status)
.select("max(publishing_queue_item_id)")).order(id: :desc)
.select("max(publishing_queue_item_id)"))
}

has_many :publishing_pipeline_states
Expand Down

0 comments on commit 18af389

Please sign in to comment.