Sha256: 8d94b8f058351d4faffe3de761ce4dddda8b4cfe2e7b448a3a26134bcf6241a0

Contents?: true

Size: 809 Bytes

Versions: 52

Compression:

Stored size: 809 Bytes

Contents

module Datahen
  class CLI < Thor
    class ScraperFinisher < Thor

      package_name "scraper finisher"
      def self.banner(command, namespace = nil, subcommand = false)
        "#{basename} #{@package_name} #{command.usage}"
      end

      desc "reset <scraper_name>", "Reset finisher on a scraper's current job"
      long_desc <<-LONGDESC
        Reset finisher on a scraper's current job.\x5
      LONGDESC
      option :job, :aliases => :j, type: :numeric, desc: 'Set a specific job ID'
      def reset(scraper_name)
        if options[:job]
          client = Client::JobFinisher.new(options)
          puts "#{client.reset(options[:job])}"
        else
          client = Client::ScraperFinisher.new(options)
          puts "#{client.reset(scraper_name)}"
        end
      end
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
datahen-0.20.0 lib/datahen/cli/scraper_finisher.rb
datahen-0.19.0 lib/datahen/cli/scraper_finisher.rb
datahen-0.18.0 lib/datahen/cli/scraper_finisher.rb
datahen-0.17.0 lib/datahen/cli/scraper_finisher.rb
datahen-0.16.2 lib/datahen/cli/scraper_finisher.rb
datahen-0.16.1 lib/datahen/cli/scraper_finisher.rb
datahen-0.16.0 lib/datahen/cli/scraper_finisher.rb
datahen-0.15.11 lib/datahen/cli/scraper_finisher.rb
datahen-0.15.10 lib/datahen/cli/scraper_finisher.rb
datahen-0.15.9 lib/datahen/cli/scraper_finisher.rb
datahen-0.14.26 lib/datahen/cli/scraper_finisher.rb
datahen-0.14.25 lib/datahen/cli/scraper_finisher.rb
datahen-0.14.24 lib/datahen/cli/scraper_finisher.rb
datahen-0.14.22 lib/datahen/cli/scraper_finisher.rb
datahen-0.14.21 lib/datahen/cli/scraper_finisher.rb
datahen-0.14.20 lib/datahen/cli/scraper_finisher.rb
datahen-0.14.19 lib/datahen/cli/scraper_finisher.rb
datahen-0.14.18 lib/datahen/cli/scraper_finisher.rb
datahen-0.14.17 lib/datahen/cli/scraper_finisher.rb
datahen-0.14.16 lib/datahen/cli/scraper_finisher.rb