Class: S3Poller::Poller
- Inherits:
-
Object
- Object
- S3Poller::Poller
- Defined in:
- lib/s3poller/poller.rb
Instance Method Summary collapse
-
#initialize(config_path, local_path) ⇒ Poller
constructor
A new instance of Poller.
- #poll ⇒ Object
Constructor Details
#initialize(config_path, local_path) ⇒ Poller
Returns a new instance of Poller.
8 9 10 11 |
# File 'lib/s3poller/poller.rb', line 8 def initialize(config_path, local_path) @local_path = local_path @aws_config = YAML::load(File.open(config_path)) end |
Instance Method Details
#poll ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/s3poller/poller.rb', line 13 def poll begin files_to_download.each do |file| downloader.download(file) end rescue Exception => e $log.error("Failed to poll #{e.}") end end |