3 #You might want to change this
4 ENV["RAILS_ENV"] ||= "development"
6 require File.dirname(__FILE__) + "/../../config/environment"
15 ActiveRecord::Base.logger.info("GPX Import daemon wake @ #{Time.now}.")
17 traces = Trace.find(:all, :conditions => ['inserted = ?', false])
19 if traces and traces.length > 0
20 traces.each do |trace|
23 ActiveRecord::Base.logger.info("GPX Import importing #{trace.name} from #{trace.user.email}")
25 # gpx = OSM::GPXImporter.new('/tmp/2.gpx')
26 # gpx.points do |point|
27 # puts point['latitude']
30 Notifier::deliver_gpx_success(trace)
32 Notifier::deliver_gpx_failure(trace)