Sha256: 0e0e9cd98b64f537b0f8ec5dce6ce67068c8463e3065624b24f8a1f47b53b6d2

Contents?: true

Size: 820 Bytes

Versions: 38

Compression:

Stored size: 820 Bytes

Contents

namespace :http_utilities do
  namespace :proxies do
    desc "Proxy tasks"

    task :seed_proxies => :environment do |task, args|
      seeder = HttpUtilities::Proxies::ProxySeeder.new
      seeder.seed
    end

    task :check_proxies, [:protocol, :proxy_type, :mode, :maximum_failed_attempts] => [:environment] do |task, args|
      args.with_defaults(protocol: :http, proxy_type: :public, mode: :synchronous, maximum_failed_attempts: 10)
      
      proxy_checker = HttpUtilities::Proxies::ProxyChecker.new
      proxy_checker.check_and_update_proxies(
        protocol:                 args.protocol.to_sym, 
        proxy_type:               args.proxy_type.to_sym, 
        mode:                     args.mode.to_sym,
        maximum_failed_attempts:  args.maximum_failed_attempts.to_i
      )
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
http_utilities-1.4.3 lib/tasks/http_utilities_tasks.rake
http_utilities-1.4.2 lib/tasks/http_utilities_tasks.rake
http_utilities-1.4.1 lib/tasks/http_utilities_tasks.rake
http_utilities-1.4.0 lib/tasks/http_utilities_tasks.rake
http_utilities-1.3.9 lib/tasks/http_utilities_tasks.rake
http_utilities-1.3.8 lib/tasks/http_utilities_tasks.rake
http_utilities-1.3.7 lib/tasks/http_utilities_tasks.rake
http_utilities-1.3.6 lib/tasks/http_utilities_tasks.rake
http_utilities-1.3.5 lib/tasks/http_utilities_tasks.rake
http_utilities-1.3.4 lib/tasks/http_utilities_tasks.rake
http_utilities-1.3.3 lib/tasks/http_utilities_tasks.rake
http_utilities-1.3.2 lib/tasks/http_utilities_tasks.rake
http_utilities-1.3.1 lib/tasks/http_utilities_tasks.rake
http_utilities-1.3.0 lib/tasks/http_utilities_tasks.rake
http_utilities-1.2.7 lib/tasks/http_utilities_tasks.rake
http_utilities-1.2.6.5 lib/tasks/http_utilities_tasks.rake
http_utilities-1.2.6.4 lib/tasks/http_utilities_tasks.rake
http_utilities-1.2.6.3 lib/tasks/http_utilities_tasks.rake
http_utilities-1.2.6.2 lib/tasks/http_utilities_tasks.rake
http_utilities-1.2.6.1 lib/tasks/http_utilities_tasks.rake