Sha256: 2d27cc19ed1e4576c14863a85f0960e97ccbd24aa2391cd936242f3f9529c445
Contents?: true
Size: 1.04 KB
Versions: 11
Compression:
Stored size: 1.04 KB
Contents
namespace :sync do task :records => :environment do system_setting = SystemSetting.singleton puts system_setting.sync end task :gamespy => :environment do puts "Fetching server info..." geo = ENV['NOGEO'] ? "" : nil puts "Pings and Countries: #{geo.nil?}" puts q = Six::Query::GamespyMaster.new(geo) h = q.process puts puts "Received #{h.size} servers" puts puts "Updating database..." h.each_pair do |key, e| Queryserver.import(e) end puts "Pruning database..." Queryserver.prune puts "Cleaning database..." Queryserver.clean end task :system => :environment do Six::Dbmanager.reload_system end task :data => :environment do Six::Dbmanager.reload_data end end task :export => :environment do if ENV.include?("preset") config = Sixconfig.find(ENV['preset'].to_i) File.open(File.join(SixUpdaterWeb::DATA_PATH, 'six-updater.yml'), 'w') do |file| file.puts config.to_updater_yml end else puts "Error: No preset selected" end end
Version data entries
11 entries across 11 versions & 1 rubygems