bolt 2.11.0 → 2.11.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bolt might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffe8fa93c2b9de411d9c2ef46c6c68deae3e10c7b711451dd1acf12034952b31
4
- data.tar.gz: 4892ece130a2c4c8d70aa6315df85c13be920c290c2e337dddf2b493180bea58
3
+ metadata.gz: c5e8e35ad928f8c0b182e0ce9457e5a33e0450da886f91b59637521fd72dc624
4
+ data.tar.gz: d6b4c4844b91c6cfd8122422b37ebe567bb9a2be9557b3ceb3b3b266b599ca79
5
5
  SHA512:
6
- metadata.gz: b95e67238b0af8b5ded1c2f14f1514fb5ab715ae43afbca3247c4f4224d7f403385e0b3f6072babbc90faeb8bcaa4d7cc0b79319258f509340fe765c3e9e13b7
7
- data.tar.gz: 9e1584102d3b103632e36d9c922df007c9b780d69a088b964ef59ff4162e94abdc12693e61fea42c5256a97ebf245e2dd4222d4019d98db2d658a10b4f15e317
6
+ metadata.gz: 22b535ce7535ed5eb746c51f08794aa399f55be9e3b2e7ce83f1a38650f23902808245fe4162c033d3024a21dd1a1dd452e341eb4de34ebe9b2872b71ea17e59
7
+ data.tar.gz: dc9ec1c71c2509dcabe92da46b3432d2b2c1e42b313a5dc274afc665bf739dd6b6582634ec5c5367b5dc6835cdbb387840344c20405249e304d8b43681ee9ac0
@@ -473,12 +473,18 @@ module Bolt
473
473
  end.join
474
474
  end
475
475
 
476
+ # Etc::SC_OPEN_MAX is meaningless on windows, not defined in PE Jruby and not available
477
+ # on some platforms. This method holds the logic to decide whether or not to even consider it.
478
+ def sc_open_max_available?
479
+ !Bolt::Util.windows? && defined?(Etc::SC_OPEN_MAX) && Etc.sysconf(Etc::SC_OPEN_MAX)
480
+ end
481
+
476
482
  def default_concurrency
477
- if Bolt::Util.windows? || Etc.sysconf(Etc::SC_OPEN_MAX) >= 300 || Etc.sysconf(Etc::SC_OPEN_MAX).nil?
478
- DEFAULT_DEFAULT_CONCURRENCY
479
- else
480
- (Etc.sysconf(Etc::SC_OPEN_MAX) / 3).floor
481
- end
483
+ @default_concurrency ||= if !sc_open_max_available? || Etc.sysconf(Etc::SC_OPEN_MAX) >= 300
484
+ DEFAULT_DEFAULT_CONCURRENCY
485
+ else
486
+ Etc.sysconf(Etc::SC_OPEN_MAX) / 3
487
+ end
482
488
  end
483
489
  end
484
490
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bolt
4
- VERSION = '2.11.0'
4
+ VERSION = '2.11.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolt
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.0
4
+ version: 2.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-27 00:00:00.000000000 Z
11
+ date: 2020-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable