Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'develop' of https://github.com/gucki/navvy into gucki-d…

…evelop
  • Loading branch information...
commit 15c171a02e0134870cfcc42b2a94b4dc3e023d82 2 parents 1624363 + b30c59d
@jeffkreeftmeijer authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/navvy/job/sequel.rb
View
5 lib/navvy/job/sequel.rb
@@ -46,7 +46,7 @@ def self.enqueue(object, method_name, *args)
def self.next(limit = self.limit)
filter(:failed_at => nil).
filter(:completed_at => nil).
- filter{:run_at <= Time.now}.
+ filter{run_at <= Time.now}.
order(:priority.desc, :created_at).
first(limit)
end
@@ -60,7 +60,8 @@ def self.next(limit = self.limit)
def self.cleanup
if keep.is_a? Fixnum
- filter(:completed_at <= (Time.now - keep)).delete
+ time = Time.now - keep
+ filter{completed_at <= time}.delete
else
filter(~{:completed_at => nil}).delete unless keep?
end
Please sign in to comment.
Something went wrong with that request. Please try again.