Permalink
Browse files

updated mongoid job adapter

Updated the mongoid job adapter to work with Mongoid 3.x
  • Loading branch information...
1 parent 0fcb1cf commit a2eff902c7249defb427f9aed1343890d3c3ed3e Craig Wickesser committed Jan 22, 2014
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/navvy/job/mongoid.rb
View
@@ -11,16 +11,16 @@ class Job
field :priority, :type => Integer, :default => 0
field :return, :type => String
field :exception, :type => String
- field :parent_id, :type => BSON::ObjectId
+ field :parent_id, :type => Moped::BSON::ObjectId
field :created_at, :type => Time
field :run_at, :type => Time
field :started_at, :type => Time
field :completed_at, :type => Time
field :failed_at, :type => Time
- index [[:priority, Mongo::DESCENDING]]
- index [[:created_at, Mongo::ASCENDING]]
-
+ index({priority: -1})
+ index({created_at: 1})
+
##
# Add a job to the job queue.
#

0 comments on commit a2eff90

Please sign in to comment.