Class: WarmingDrawer::Workers::UrlWorker
- Inherits:
-
BaseWorker
- Object
- BaseWorker
- WarmingDrawer::Workers::UrlWorker
- Includes:
- Sidekiq::Worker
- Defined in:
- lib/warming_drawer/workers/url_worker.rb
Instance Method Summary collapse
Methods inherited from BaseWorker
options, perform_with, perform_with_queue, perform_without_queue
Instance Method Details
#perform(*urls) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/warming_drawer/workers/url_worker.rb', line 10 def perform(*urls) config = WarmingDrawer.configuration auth_present = config.basic_auth_username && config.basic_auth_password http = HTTPClient.new http.set_auth(nil, config.basic_auth_username, config.basic_auth_password) urls.flatten.each { |url| http.get url } end |