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-1.6.3 lib/datahen/cli/scraper_finisher.rb
datahen-1.6.2 lib/datahen/cli/scraper_finisher.rb
datahen-1.6.1 lib/datahen/cli/scraper_finisher.rb
datahen-1.6.0 lib/datahen/cli/scraper_finisher.rb
datahen-1.5.3 lib/datahen/cli/scraper_finisher.rb
datahen-1.5.2 lib/datahen/cli/scraper_finisher.rb
datahen-1.5.1 lib/datahen/cli/scraper_finisher.rb
datahen-1.4.0 lib/datahen/cli/scraper_finisher.rb
datahen-1.3.2 lib/datahen/cli/scraper_finisher.rb
datahen-1.3.1 lib/datahen/cli/scraper_finisher.rb
datahen-1.3.0 lib/datahen/cli/scraper_finisher.rb
datahen-1.2.3 lib/datahen/cli/scraper_finisher.rb
datahen-1.2.2 lib/datahen/cli/scraper_finisher.rb
datahen-1.2.1 lib/datahen/cli/scraper_finisher.rb
datahen-1.1.2 lib/datahen/cli/scraper_finisher.rb
datahen-1.1.1 lib/datahen/cli/scraper_finisher.rb
datahen-1.0.3 lib/datahen/cli/scraper_finisher.rb
datahen-1.0.2 lib/datahen/cli/scraper_finisher.rb
datahen-1.0.1 lib/datahen/cli/scraper_finisher.rb
datahen-1.0.0 lib/datahen/cli/scraper_finisher.rb