This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :geocoder do | |
desc "Geocode all objects without coordinates." | |
task :all_with_retry => :environment do | |
class_name = ENV['CLASS'] || ENV['class'] | |
sleep_timer = ENV['SLEEP'] || ENV['sleep'] | |
raise "Please specify a CLASS (model)" unless class_name | |
klass = class_from_string(class_name) | |
klass.not_geocoded.each do |obj| | |
geocode_with_retry obj |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assumes you have a role attribue on user model | |
authenticate :user, lambda {|u| u.role == 'super_admin' } do | |
mount Resque::Server.new, :at => "/resque" | |
end |
NewerOlder