From: Tom Hughes Date: Fri, 8 Oct 2010 11:27:37 +0000 (+0100) Subject: Fix for postgres boolean support X-Git-Tag: live~6292^2~7 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/b658f5d14830d49c0a91d88ca40470b3d823d8a0 Fix for postgres boolean support --- diff --git a/lib/daemons/gpx_import.rb b/lib/daemons/gpx_import.rb index e24dc1ad5..8250a67f5 100755 --- a/lib/daemons/gpx_import.rb +++ b/lib/daemons/gpx_import.rb @@ -12,7 +12,7 @@ logger = ActiveRecord::Base.logger while(true) do ActiveRecord::Base.logger.info("GPX Import daemon wake @ #{Time.now}.") - Trace.find(:all, :conditions => "inserted = 0 and visible = 1", :order => "id").each do |trace| + Trace.find(:all, :conditions => { :inserted => false, :visible => true }, :order => "id").each do |trace| Signal.trap("TERM") do terminated = true end @@ -38,7 +38,7 @@ while(true) do exit if terminated end - Trace.find(:all, :conditions => "visible = 0", :order => "id").each do |trace| + Trace.find(:all, :conditions => { :visible => false }, :order => "id").each do |trace| Signal.trap("TERM") do terminated = true end