lib/seam/mongodb.rb in seam-mongodb-0.0.2 vs lib/seam/mongodb.rb in seam-mongodb-0.0.3

- old
+ new

@@ -1,8 +1,9 @@ require 'seam' require "seam/mongodb/version" require 'moped' +require 'subtle' module Seam module Mongodb def self.collection @@ -23,10 +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 } } ) - .map { |x| Seam::Effort.parse x } + .map do |x| + -> do + Seam::Effort.parse x + end.to_object + end end def self.save effort Seam::Mongodb.collection .find( { id: effort.id } )