datahen 1.1.1 → 1.1.2
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_page.rb +8 -4
- data/lib/datahen/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: affc49d8b9ed853c138aba0ec2af224b7f3065de8d06f9395ab49ff91332408b
|
4
|
+
data.tar.gz: b2668aa8fddba8c71b1b05b5b3e492deca25e82cd8f5dd9b53428a16cd3b4d1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1c22a97ad04ce972f5c41dc1749e3613a45da9f43f31c8512703e67f2aaa9862bdb1b373eed6e8bfd2150471598e44054424b93612fd18241db1f78398230d4
|
7
|
+
data.tar.gz: e27c597ddc83e250bcb5edc7db8379f5498ea5636cd599fa7bfa4de8aabd6925e664ffd11aabb4389e5906e45bbca4dbf807db48094070e1dd99abffab1bd874
|
@@ -131,13 +131,14 @@ module Datahen
|
|
131
131
|
Reparse pages in a scraper's current job. You need to specify either a --gid or --parse-fail or --status or --page-type.\x5
|
132
132
|
LONGDESC
|
133
133
|
option :gid, :aliases => :g, type: :string, desc: 'Reparse a specific GID'
|
134
|
+
option :fetch_fail, type: :boolean, desc: 'Reparse only pages that fails fetching.'
|
134
135
|
option :parse_fail, type: :boolean, desc: 'Reparse only pages that fails parsing.'
|
135
136
|
option :status, type: :string, desc: 'Reparse only pages with a specific status.'
|
136
137
|
option :page_type, type: :string, desc: 'Refetches only pages with a specific page type.'
|
137
138
|
option :job, :aliases => :j, type: :numeric, desc: 'Set a specific job ID'
|
138
139
|
def reparse(scraper_name)
|
139
|
-
if !options.key?(:gid) && !options.key?(:parse_fail) && !options.key?(:status) && !options.key?(:page_type)
|
140
|
-
puts "Must specify either a --gid, --parse-fail, --status or --page-type"
|
140
|
+
if !options.key?(:gid) && !options.key?(:fetch_fail) && !options.key?(:parse_fail) && !options.key?(:status) && !options.key?(:page_type)
|
141
|
+
puts "Must specify either a --gid, --fetch-fail, --parse-fail, --status or --page-type"
|
141
142
|
return
|
142
143
|
end
|
143
144
|
|
@@ -155,11 +156,14 @@ module Datahen
|
|
155
156
|
Move pages in a scraper's current job to limbo. You need to specify either a --gid or --status.\x5
|
156
157
|
LONGDESC
|
157
158
|
option :gid, :aliases => :g, type: :string, desc: 'Move a specific GID to limbo'
|
159
|
+
option :fetch_fail, type: :boolean, desc: 'Move pages that fails fetching to limbo.'
|
160
|
+
option :parse_fail, type: :boolean, desc: 'Move pages that fails parsing to limbo.'
|
158
161
|
option :status, type: :string, desc: 'Move pages with a specific status to limbo.'
|
162
|
+
option :page_type, type: :string, desc: 'Move pages with a specific page type to limbo.'
|
159
163
|
option :job, :aliases => :j, type: :numeric, desc: 'Set a specific job ID'
|
160
164
|
def limbo(scraper_name)
|
161
|
-
if !options.key?(:gid) && !options.key?(:status)
|
162
|
-
puts "Must specify either a --gid or --
|
165
|
+
if !options.key?(:gid) && !options.key?(:fetch_fail) && !options.key?(:parse_fail) && !options.key?(:status) && !options.key?(:page_type)
|
166
|
+
puts "Must specify either a --gid, --fetch-fail, --parse-fail, --status or --page-type"
|
163
167
|
return
|
164
168
|
end
|
165
169
|
|
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: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parama Danoesubroto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|