Skip to content

Commit d28121b

Browse files
committed
Use backwards compatible range notation for Delayed Jobs' run_at
1 parent e84c490 commit d28121b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/hirefire/macro/delayed_job.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def job_queue_latency(*queues)
3030

3131
query =
3232
::Delayed::Job
33-
.where(run_at: ..Time.now)
33+
.where("run_at <= ?", Time.now)
3434
.where(failed_at: nil)
3535
.order(run_at: :asc)
3636

@@ -68,7 +68,7 @@ def job_queue_size(*queues)
6868

6969
query =
7070
::Delayed::Job
71-
.where(run_at: ..Time.now)
71+
.where("run_at <= ?", Time.now)
7272
.where(failed_at: nil)
7373

7474
if queues.any?

0 commit comments

Comments
 (0)