taf2 / curb

Ruby bindings for libcurl
Other
1.29k stars 229 forks source link

Nothing is running? #375

Closed csdougliss closed 5 years ago

csdougliss commented 5 years ago
namespace :magento do
  task :dev2_cache_warmer_gem do
    on roles(:app) do
      within release_path do
          Curl::Easy.perform("http://127.0.0.1:8080") do |curl|
            curl.headers["Host"] = "www-xxx"
          end
      end
    end
  end
end

after("magento:cache:flush", "magento:dev2_cache_warmer_gem")

Other tasks specified after magento:cache:flush are - have I not done something correctly?

taf2 commented 5 years ago

Maybe set a timeout on that request?

response = Curl.get('http://127.0.0.1:8080") {|http|
     http.headers['Host'] = 'www-xxx'
     http.timeout = 10
}

that's my best guess also can use the simpler Curl.get method...