lib/pigeon/task.rb in pigeon-0.9.2 vs lib/pigeon/task.rb in pigeon-0.9.2.1
- old
+ new
@@ -78,18 +78,18 @@
end
# Returns a numerical priority order. If redefined in a subclass,
# should return a comparable value.
def priority
- @created_at
+ @created_at.to_f
end
def inspect
"<#{self.class}\##{self.object_id}>"
end
def <=>(task)
- self.priority.to_i <=> task.priority.to_i
+ self.priority <=> task.priority
end
protected
def run_state!(state)
# Grab the current state and save it here, as it may switch at any time