Permalink
Browse files

Update priority in mongo

  • Loading branch information...
1 parent 72dd099 commit 661f0f38a848135f81bf51125c205185dcce271c @bkeepers bkeepers committed Jan 12, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/delayed/backend/mongo.rb
@@ -32,7 +32,7 @@ def self.find_available(worker_name, limit = 5, max_run_time = Worker.max_run_ti
'$where' => where,
:limit => limit,
:failed_at => nil,
- :sort => [['priority', -1], ['run_at', 1]]
+ :sort => [['priority', 1], ['run_at', 1]]
}
# (conditions[:priority] ||= {})['$gte'] = Worker.min_priority if Worker.min_priority

0 comments on commit 661f0f3

Please sign in to comment.