Skip to content
Browse files

Revert "roll back _id sort change, it's just not fast enough"

This reverts commit bd6b5ca.
  • Loading branch information...
1 parent bd6b5ca commit f11a644714e24214985dfada14cd636d32921952 @mediocretes mediocretes committed Dec 14, 2010
Showing with 2 additions and 3 deletions.
  1. +1 −2 lib/resque.rb
  2. +1 −1 lib/resque/version.rb
  3. BIN resque-igo-1.12.1.gem
View
3 lib/resque.rb
@@ -182,8 +182,7 @@ def pop(queue)
query['delay_until'] = { '$not' => { '$gt' => Time.new}}
end
#sorting will result in significant performance penalties for large queues, you have been warned.
- #this applies to _id, too. it'd be nice, but it won't work, so don't try it.
- item = mongo[queue].find_and_modify(:query => query, :remove => true) #, :sort => [[:_id, :asc]] )
+ item = mongo[queue].find_and_modify(:query => query, :remove => true, :sort => [[:_id, :asc]] )
rescue Mongo::OperationFailure => e
return nil if e.message =~ /No matching object/
raise e
View
2 lib/resque/version.rb
@@ -1,3 +1,3 @@
module Resque
- Version = VERSION = '1.12.4'
+ Version = VERSION = '1.12.3'
end
View
BIN resque-igo-1.12.1.gem
Binary file not shown.

0 comments on commit f11a644

Please sign in to comment.
Something went wrong with that request. Please try again.