diff options
author | John Keiser <jkeiser@opscode.com> | 2014-08-31 10:07:21 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2014-09-05 12:09:08 -0700 |
commit | 865ae8a61ccb3395c7f738871be0bf7a2d1b02ce (patch) | |
tree | 2e60dd013042dd4091a30206e33d5b7becce5b8e /lib/chef/chef_fs/parallelizer.rb | |
parent | 27b05b2396459f3d84f0ebd924f8adc44a906cd1 (diff) | |
download | chef-865ae8a61ccb3395c7f738871be0bf7a2d1b02ce.tar.gz |
Add org.json, members.json, invitations.json for full org download
and upload support
Diffstat (limited to 'lib/chef/chef_fs/parallelizer.rb')
-rw-r--r-- | lib/chef/chef_fs/parallelizer.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/chef_fs/parallelizer.rb b/lib/chef/chef_fs/parallelizer.rb index 116a626869..f29a2deae7 100644 --- a/lib/chef/chef_fs/parallelizer.rb +++ b/lib/chef/chef_fs/parallelizer.rb @@ -53,6 +53,7 @@ class Chef end def resize(to_threads, wait = true, timeout = nil) + to_threads = 0 if to_threads < num_threads threads_to_stop = @threads[to_threads..num_threads-1] @threads = @threads.slice(0, to_threads) @@ -89,6 +90,7 @@ class Chef begin while !@stop_thread[Thread.current] begin + puts "Got a task!" task = @tasks.pop task.call rescue |