Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CommandTimeout handling #68

Merged
merged 1 commit into from
Feb 11, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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