Skip to content

Commit

Permalink
Merge pull request #68 from jcrobak/command-timeout-fix
Browse files Browse the repository at this point in the history
Fix CommandTimeout handling
  • Loading branch information
bflad committed Feb 11, 2014
2 parents e0a1ec7 + b75062f commit 74dc443
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
3 changes: 3 additions & 0 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ def initialize(timeout)
end
end

# Exception to signify that the docker command timed out.
class CommandTimeout < RuntimeError; end

def cli_args(spec)
cli_line = ''
spec.each_pair do |arg, value|
Expand Down
2 changes: 0 additions & 2 deletions providers/container.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include Helpers::Docker

class CommandTimeout < RuntimeError; end

def load_current_resource
@current_resource = Chef::Resource::DockerContainer.new(new_resource)
wait_until_ready!
Expand Down
2 changes: 0 additions & 2 deletions providers/image.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include Helpers::Docker

class CommandTimeout < RuntimeError; end

def load_current_resource
wait_until_ready!
@current_resource = Chef::Resource::DockerImage.new(new_resource)
Expand Down
2 changes: 0 additions & 2 deletions providers/registry.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include Helpers::Docker

class CommandTimeout < RuntimeError; end

def load_current_resource
@current_resource = Chef::Resource::DockerRegistry.new(new_resource)
wait_until_ready!
Expand Down

0 comments on commit 74dc443

Please sign in to comment.