datahen 1.6.0 → 1.6.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_job.rb +1 -0
- data/lib/datahen/client/job.rb +1 -0
- data/lib/datahen/client/scraper_job.rb +2 -0
- data/lib/datahen/scraper/batch_parser.rb +1 -0
- data/lib/datahen/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e50d613f032a73931f9282cb0da3c030595a3affa4aa085ec1e696760ae21bd1
|
4
|
+
data.tar.gz: ed6e1870993149a4a570b7f66b36d8590dd3315377aa74c0267796e75eac3d5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1e37969007bdafd4a9785763035664c58af0a07716a02832fc6dc1cd3d2886042369477c0df93178910135d5aa5fa5918a5de5408057c85a31a5fab666379f0
|
7
|
+
data.tar.gz: dce1ad62352fe394e2fbf92a6d861d4547cf340a0a62116cffbf84162e2463f9743f2737bbdb8887382396127355a956ca00999233a3178b40dd99563ad1a9bc
|
@@ -112,6 +112,7 @@ module Datahen
|
|
112
112
|
option :soft_refetch_limit, type: :numeric, desc: 'Set the soft refetch limit value.'
|
113
113
|
option :parsing_try_limit, type: :numeric, desc: 'Set the parsing try limit value.'
|
114
114
|
option :prevent_kb_autoscaler, type: :boolean, desc: 'Set true to prevent the autoscaler from restarting the job. Default: false'
|
115
|
+
option :deletion_protected, type: :boolean, desc: 'Set true to prevent the job to be deleted from max job count or job older than X days rules. Default: false'
|
115
116
|
def update(scraper_name)
|
116
117
|
if options[:job]
|
117
118
|
client = Client::Job.new(options)
|
data/lib/datahen/client/job.rb
CHANGED
@@ -29,6 +29,7 @@ module Datahen
|
|
29
29
|
body[:soft_refetch_limit] = opts[:soft_refetch_limit] if opts[:soft_refetch_limit]
|
30
30
|
body[:parsing_try_limit] = opts[:parsing_try_limit] if opts[:parsing_try_limit]
|
31
31
|
body[:prevent_kb_autoscaler] = opts[:prevent_kb_autoscaler] if opts.has_key?("prevent_kb_autoscaler") || opts.has_key?(:prevent_kb_autoscaler)
|
32
|
+
body[:deletion_protected] = opts[:deletion_protected] if opts.has_key?("deletion_protected") || opts.has_key?(:deletion_protected)
|
32
33
|
params = @options.merge({body: body.to_json})
|
33
34
|
|
34
35
|
self.class.put("/jobs/#{job_id}", params)
|
@@ -19,6 +19,7 @@ module Datahen
|
|
19
19
|
body[:soft_refetch_limit] = opts[:soft_refetch_limit] if opts[:soft_refetch_limit]
|
20
20
|
body[:parsing_try_limit] = opts[:parsing_try_limit] if opts[:parsing_try_limit]
|
21
21
|
body[:prevent_kb_autoscaler] = opts[:prevent_kb_autoscaler] if opts.has_key?("prevent_kb_autoscaler") || opts.has_key?(:prevent_kb_autoscaler)
|
22
|
+
body[:deletion_protected] = opts[:deletion_protected] if opts.has_key?("deletion_protected") || opts.has_key?(:deletion_protected)
|
22
23
|
if opts[:vars]
|
23
24
|
if opts[:vars].is_a?(Array)
|
24
25
|
body[:vars] = opts[:vars]
|
@@ -53,6 +54,7 @@ module Datahen
|
|
53
54
|
body[:soft_refetch_limit] = opts[:soft_refetch_limit] if opts[:soft_refetch_limit]
|
54
55
|
body[:parsing_try_limit] = opts[:parsing_try_limit] if opts[:parsing_try_limit]
|
55
56
|
body[:prevent_kb_autoscaler] = opts[:prevent_kb_autoscaler] if opts.has_key?("prevent_kb_autoscaler") || opts.has_key?(:prevent_kb_autoscaler)
|
57
|
+
body[:deletion_protected] = opts[:deletion_protected] if opts.has_key?("deletion_protected") || opts.has_key?(:deletion_protected)
|
56
58
|
params = @options.merge({body: body.to_json})
|
57
59
|
|
58
60
|
self.class.put("/scrapers/#{scraper_name}/current_job", params)
|
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.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parama Danoesubroto
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -284,7 +284,7 @@ metadata:
|
|
284
284
|
allowed_push_host: https://rubygems.org
|
285
285
|
homepage_uri: https://datahen.com
|
286
286
|
source_code_uri: https://github.com/DataHenOfficial/datahen-ruby
|
287
|
-
post_install_message:
|
287
|
+
post_install_message:
|
288
288
|
rdoc_options: []
|
289
289
|
require_paths:
|
290
290
|
- lib
|
@@ -299,8 +299,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
299
299
|
- !ruby/object:Gem::Version
|
300
300
|
version: '0'
|
301
301
|
requirements: []
|
302
|
-
rubygems_version: 3.
|
303
|
-
signing_key:
|
302
|
+
rubygems_version: 3.0.3
|
303
|
+
signing_key:
|
304
304
|
specification_version: 4
|
305
305
|
summary: DataHen toolbelt for developers
|
306
306
|
test_files: []
|