datahen 0.14.10 → 0.14.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/datahen/cli/scraper_job.rb +3 -2
- data/lib/datahen/client/base.rb +1 -0
- data/lib/datahen/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 678f01c798cd52a29da298f48e65b1139f13c80a1214d2c1328f4a4c49abbc63
|
4
|
+
data.tar.gz: 0f787dc429274bb1cd0521237883615e7f8c83316d36fcb319e542cd0fe22d7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcaf8fbd6dcfb04f74b8b65ffdcbc127c3e8f179bf0b6da3f2e55acbd2f8d0e425f09a79287bc3ff1791b3fd20e1503c31af3a3128af6eaaedf43e149f1bc995
|
7
|
+
data.tar.gz: 577dda3f28fe7303c08aa290f2fa82150e6f1e679184fac739f839f9de6200be11df7111eddd79f7db7fcfa3aa03f925933db85bed382a1c5c0211534b384e67
|
@@ -68,13 +68,14 @@ module Datahen
|
|
68
68
|
Pauses a scraper's current job
|
69
69
|
LONGDESC
|
70
70
|
option :job, :aliases => :j, type: :numeric, desc: 'Set a specific job ID'
|
71
|
+
option :force, :aliases => :f, type: :boolean, desc: 'Force a job to be paused from a done or cancelled status'
|
71
72
|
def pause(scraper_name)
|
72
73
|
if options[:job]
|
73
74
|
client = Client::Job.new(options)
|
74
|
-
puts "#{client.pause(options[:job])}"
|
75
|
+
puts "#{client.pause(options[:job], options)}"
|
75
76
|
else
|
76
77
|
client = Client::ScraperJob.new(options)
|
77
|
-
puts "#{client.pause(scraper_name)}"
|
78
|
+
puts "#{client.pause(scraper_name, options)}"
|
78
79
|
end
|
79
80
|
end
|
80
81
|
|
data/lib/datahen/client/base.rb
CHANGED
@@ -58,6 +58,7 @@ module Datahen
|
|
58
58
|
query[:limit] = opts[:limit] if opts[:limit]
|
59
59
|
query[:order] = opts[:order] if opts[:order]
|
60
60
|
query[:filter] = opts[:filter] if opts[:filter]
|
61
|
+
query[:force] = opts[:force] if opts[:force]
|
61
62
|
|
62
63
|
if opts[:query]
|
63
64
|
if opts[:query].is_a?(Hash)
|
data/lib/datahen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datahen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parama Danoesubroto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -266,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
266
266
|
- !ruby/object:Gem::Version
|
267
267
|
version: '0'
|
268
268
|
requirements: []
|
269
|
-
rubygems_version: 3.
|
269
|
+
rubygems_version: 3.0.3
|
270
270
|
signing_key:
|
271
271
|
specification_version: 4
|
272
272
|
summary: DataHen toolbelt for developers
|