Class: Datahen::CLI::Seeder
- Inherits:
-
Thor
- Object
- Thor
- Datahen::CLI::Seeder
- Defined in:
- lib/datahen/cli/seeder.rb
Instance Method Summary collapse
Instance Method Details
#exec_parse(scraper_name, seeder_file) ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/datahen/cli/seeder.rb', line 29 def exec_parse(scraper_name, seeder_file) if [:job] job_id = [:job] else job = Client::ScraperJob.new().find(scraper_name) job_id = job['id'] end puts Datahen::Scraper::Seeder.exec_seeder(seeder_file, job_id, true, [:"keep-outputs"]) end |
#try_seed(scraper_name, seeder_file) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/datahen/cli/seeder.rb', line 11 def try_seed(scraper_name, seeder_file) if [:job] job_id = [:job] else job = Client::ScraperJob.new().find(scraper_name) job_id = job['id'] end puts Datahen::Scraper::Seeder.exec_seeder(seeder_file, job_id, false, [:"keep-outputs"]) end |