From b658f5d14830d49c0a91d88ca40470b3d823d8a0 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 8 Oct 2010 12:27:37 +0100 Subject: [PATCH] Fix for postgres boolean support --- lib/daemons/gpx_import.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5