datahen 1.6.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94937cbe6614336d283523740d1bd237b154a7e084dd3c0757dda96a068cc4c2
4
- data.tar.gz: 51552871510232be116af8d0f108e5ee51d6733657abb681b1561d78eb68efff
3
+ metadata.gz: 0aeab36656b35d48d158c46e90cf504007727d60000352503468c743b8f519f3
4
+ data.tar.gz: 62dc78ad8d8388f62db06217507e4ff8f22d004501f264d899dfb14afd9d5df1
5
5
  SHA512:
6
- metadata.gz: a37ba23e5e4915540ee5ad656d7c93dbd4d78ab36ad9e7f05ee2019d51061793b5a914e9e5527ce40bdf42ca5f6cb758124503293fb229ccf112b8d1e2f70193
7
- data.tar.gz: 10f1cf69238cf4e8fae71e9ae892bc771d392b426d98b7168bbe9fbc9985bfcc3f0cf62dff8f9ba6fbca3484b13f29a4e2513259e0659a1a33b6708b764dccfa
6
+ metadata.gz: f83d2cf14b3b1f00ff2f7b8f319c52bb408301e318a390b419f1b87e7b4a79a0ba7b40468079c8b8b22562d24a8eef6c6bde60d40a11930dbc3af44c16c3acd7
7
+ data.tar.gz: 8a05fc8d0419c13f0849fdeb53f1c91455d359539431623138e31895c192994a786fc271df7dc2ae223f1d7a6cdaa46eeb81939e093cb6d850aded106809c66c
@@ -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)
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Datahen
2
- VERSION = "1.6.0"
2
+ VERSION = "1.6.1"
3
3
  end
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.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Parama Danoesubroto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-07 00:00:00.000000000 Z
11
+ date: 2024-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -299,7 +299,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
299
299
  - !ruby/object:Gem::Version
300
300
  version: '0'
301
301
  requirements: []
302
- rubygems_version: 3.2.15
302
+ rubygems_version: 3.5.6
303
303
  signing_key:
304
304
  specification_version: 4
305
305
  summary: DataHen toolbelt for developers