Class: DaimonSkycrawlers::Commands::Runner

Inherits:
Thor
  • Object
show all
Defined in:
lib/daimon_skycrawlers/commands/runner.rb

Instance Method Summary collapse

Instance Method Details

#crawlerObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/daimon_skycrawlers/commands/runner.rb', line 11

def crawler
  load_init
  Dir.glob("app/crawlers/**/*.rb") do |path|
    require(File.expand_path(path, Dir.pwd))
    log.info("Loaded crawler: #{path}")
  end
  DaimonSkycrawlers::Crawler.run
rescue => ex
  puts ex.message
  exit(false)
end

#processorObject



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/daimon_skycrawlers/commands/runner.rb', line 24

def processor
  load_init
  Dir.glob("app/processors/**/*.rb") do |path|
    require(File.expand_path(path, Dir.pwd))
    log.info("Loaded processor: #{path}")
  end
  DaimonSkycrawlers::Processor.run
rescue => ex
  puts ex.message
  exit(false)
end