lib/seam/mongodb.rb in seam-mongodb-0.0.3 vs lib/seam/mongodb.rb in seam-mongodb-0.0.4
- old
+ new
@@ -24,12 +24,14 @@
end
def self.find_all_pending_executions_by_step step
Seam::Mongodb.collection
.find( { next_step: step, next_execute_at: { '$lte' => Time.now } } )
+ .select( { '_id' => 1 } )
.map do |x|
-> do
- Seam::Effort.parse x
+ record = Seam::Mongodb.collection.find( { '_id' => x['_id'] } ).first
+ Seam::Effort.parse record
end.to_object
end
end
def self.save effort