Skip to content

Commit

Permalink
added || null to maps for older versions of couchdb
Browse files Browse the repository at this point in the history
  • Loading branch information
rbriank committed May 6, 2010
1 parent 36bee22 commit 72b3ea8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/delayed/backend/couch_rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ class Job < ::CouchRest::ExtendedDocument
view_by(:failed_at, :locked_by, :run_at,
:map => "function(doc){" +
" if(doc['couchrest-type'] == 'Delayed::Backend::CouchRest::Job') {" +
" emit([doc.failed_at, doc.locked_by, doc.run_at], null);}" +
" emit([doc.failed_at || null, doc.locked_by || null, doc.run_at || null], null);}" +
" }")
view_by(:failed_at, :locked_at, :run_at,
:map => "function(doc){" +
" if(doc['couchrest-type'] == 'Delayed::Backend::CouchRest::Job') {" +
" emit([doc.failed_at, doc.locked_at, doc.run_at], null);}" +
" emit([doc.failed_at || null, doc.locked_at || null, doc.run_at || null], null);}" +
" }")

def self.db_time_now; Time.now; end
Expand Down

0 comments on commit 72b3ea8

Please sign in to comment.