Skip to content

Commit

Permalink
Merge pull request #82 from swrobel/pagination-order
Browse files Browse the repository at this point in the history
Fix pagination issue where the same job appears on multiple pages
  • Loading branch information
swrobel authored Oct 2, 2020
2 parents 3f7b7b7 + 6db364b commit d663559
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Unreleased
#### Fixed:
- Fixed inconsistent pagination when several jobs have the same `run_at`

### 0.9.3 - 2020-06-17
#### Added:
- Set expired_at=NULL when rescheduling job
Expand Down
4 changes: 2 additions & 2 deletions lib/que/web/sql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def delete_jobs_query(scope)
job_class ILIKE ($3)
OR que_jobs.args #>> '{0, job_class}' ILIKE ($3)
)
ORDER BY run_at
ORDER BY run_at, id
LIMIT $1::int
OFFSET $2::int
SQL
Expand All @@ -88,7 +88,7 @@ def delete_jobs_query(scope)
job_class ILIKE ($3)
OR que_jobs.args #>> '{0, job_class}' ILIKE ($3)
)
ORDER BY run_at
ORDER BY run_at, id
LIMIT $1::int
OFFSET $2::int
SQL
Expand Down

0 comments on commit d663559

Please sign in to comment.