DelayedJob: run_at seems to override priority
With DelayedJob, If there's a big backlog of jobs and the workers can't keep up to run the jobs at their specified times, it seems DJ selects the earliest run time over priority.
As you can see from the attached image, a job was locked at a time later than those run_at's but it chose the earlier run_at instead of the higher priority.
I would expect it to do the opposite.
You seem to use Priority backwards. Lower numbers actually have higher priority. So it looks okay to me.
By default all jobs are scheduled with priority = 0, which is top priority. You can change this by setting Delayed::Worker.default_priority to something else. Lower numbers have higher priority.