generators/background/templates/background.rb in ncr-background_fu-1.0.7 vs generators/background/templates/background.rb in ncr-background_fu-1.0.8
- old
+ new
@@ -9,10 +9,10 @@
else
RAILS_DEFAULT_LOGGER.info("BackgroundFu: Starting daemon (bonus features disabled).")
end
loop do
- if job = Job.find(:first, :conditions => ["state='pending' and start_at <= ?", Time.now], :order => "priority desc, start_at asc")
+ if job = Job.find(:first, :conditions => ["state='pending' and start_at <= ?", Time.now.utc], :order => "priority desc, start_at asc")
job.get_done!
else
RAILS_DEFAULT_LOGGER.info("BackgroundFu: Waiting for jobs...")
sleep 5
end