right_chimp 2.1.26 → 2.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13cfa3ea1acbbd9d6efb16a1669723e8bd54e92c
4
- data.tar.gz: 7ea4f5f61e66653e385ffa828eab2b344684f3c7
3
+ metadata.gz: 3e4535300fdf9ef9315f023169d64859ff2a4322
4
+ data.tar.gz: fa6fdfcbe564368ad7cf99389659b3f1837938d0
5
5
  SHA512:
6
- metadata.gz: 15dbb0cd8bcf16c882e0f8a65ca721a0ad6ebb58b693ed4182460aa234b429d9b782f0a21fb90597f47acd661b59e8751a8214b831b62291d817d0934c02ff68
7
- data.tar.gz: 4dcdb39a3cbab65cb168e844c5ec01a0727bc361f7cabd88acfcfc922b1778727090e4c4012629790c6e006f28f86e705bdd768972f49ddf96b4ed315bcfea4b
6
+ metadata.gz: 3da7b50ce4eb42d35552dfe9308d05fb7b9e25ea202ebcc54eba48a6ff99790d832e327c8da2053b54981552ad84715af7404009cb3b1cea88d0fa5afa3ad235
7
+ data.tar.gz: ac89ab3a8557f4a1daa7c9cd38eb902e2e99df53b207e136627eff976dd8e2509b59fb39a1fae437b908fabb6d190fd6bf2bc300347a8fb1209612e56a517c00
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- right_chimp (2.1.26)
4
+ right_chimp (2.1.27)
5
5
  highline (~> 1.7.2)
6
6
  nokogiri (~> 1.6.7.1)
7
7
  progressbar (~> 0.11.0)
@@ -68,4 +68,4 @@ DEPENDENCIES
68
68
  rspec (~> 2.6.0)
69
69
 
70
70
  BUNDLED WITH
71
- 1.13.1
71
+ 1.13.2
@@ -920,6 +920,7 @@ module Chimp
920
920
  :inputs => @inputs,
921
921
  :timeout => @timeout,
922
922
  :delay => @delay,
923
+ :concurrency => @concurrency,
923
924
  :verbose => @@verbose,
924
925
  :quiet => @@quiet
925
926
  )
@@ -4,7 +4,7 @@
4
4
 
5
5
  module Chimp
6
6
  class Executor
7
- attr_accessor :server, :array, :exec, :inputs, :template, :owner, :group, :delay,
7
+ attr_accessor :server, :array, :exec, :inputs, :template, :owner, :group, :delay, :concurrency,
8
8
  :job_id, :job_uuid, :job_notes, :status, :dry_run, :verbose, :quiet, :timeout,
9
9
  :retry_count, :retry_sleep, :time_start, :time_end, :error
10
10
 
@@ -37,6 +37,7 @@ module Chimp
37
37
  @timeout = h[:timeout].to_i || 3600
38
38
 
39
39
  @delay = h[:delay].to_i || 0
40
+ @concurrency = h[:concurrency].to_i
40
41
 
41
42
  @error = nil
42
43
  @status = STATUS_NONE
@@ -108,7 +109,7 @@ module Chimp
108
109
  Log.debug "Running job '#{@job_id}' with status '#{@status}'"
109
110
  # If we are not the first job in this group, wait @delay
110
111
  ChimpDaemon.instance.semaphore.synchronize do
111
- if @group.started >= ChimpQueue.instance.max_threads && @delay.nonzero?
112
+ if @group.started >= @concurrency && @delay.nonzero?
112
113
  Log.info "[#{@job_uuid}] Sleeping #{@delay} seconds between tasks"
113
114
  sleep @delay
114
115
  end
@@ -1,3 +1,3 @@
1
1
  module Chimp
2
- VERSION = "2.1.26"
2
+ VERSION = "2.1.27"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_chimp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.26
4
+ version: 2.1.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - RightScale Operations
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-07 00:00:00.000000000 Z
11
+ date: 2016-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake