From 68637a381c5e08e26ada45718f782486db831227 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 24 Sep 2007 22:59:34 +0000 Subject: [PATCH] Process traces in order. --- 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 793fde94b..86bd2ac14 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').each do |trace| + Trace.find(:all, :conditions => "inserted = 0 and visible = 1", :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').each do |trace| + Trace.find(:all, :conditions => "visible = 0", :order => "id").each do |trace| Signal.trap("TERM") do terminated = true end -- 2.43.2