Skip to content
This repository has been archived by the owner on Jan 29, 2022. It is now read-only.

Commit

Permalink
roll back _id sort change, it's just not fast enough
Browse files Browse the repository at this point in the history
  • Loading branch information
mediocretes committed Dec 14, 2010
1 parent f217309 commit bd6b5ca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/resque.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ 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.
item = mongo[queue].find_and_modify(:query => query, :remove => true, :sort => [[:_id, :asc]] )
#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]] )
rescue Mongo::OperationFailure => e
return nil if e.message =~ /No matching object/
raise e
Expand Down
2 changes: 1 addition & 1 deletion lib/resque/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Resque
Version = VERSION = '1.12.3'
Version = VERSION = '1.12.4'
end
Binary file removed resque-igo-1.12.1.gem
Binary file not shown.

0 comments on commit bd6b5ca

Please sign in to comment.