Skip to content

Switch to fallback mode when failed to open TCP connection to API#63

Merged
ArturT merged 2 commits intomasterfrom
fallback-mode-for-ETIMEDOUT
Jul 20, 2018
Merged

Switch to fallback mode when failed to open TCP connection to API#63
ArturT merged 2 commits intomasterfrom
fallback-mode-for-ETIMEDOUT

Conversation

@ArturT
Copy link
Copy Markdown
Member

@ArturT ArturT commented Jul 20, 2018

This way knapsack will handle exception and switch to fallback mode when there will be issue with API availability.

Errno::ETIMEDOUT: Failed to open TCP connection to api.knapsackpro.com:443 (Connection timed out - connect(2) for "api.knapsackpro.com" port 443)
/workspace/vendor/bundle/ruby/2.3.0/gems/knapsack_pro-0.54.0/lib/knapsack_pro/client/connection.rb:88:in `post'
/workspace/vendor/bundle/ruby/2.3.0/gems/knapsack_pro-0.54.0/lib/knapsack_pro/client/connection.rb:12:in `call'
/workspace/vendor/bundle/ruby/2.3.0/gems/knapsack_pro-0.54.0/lib/knapsack_pro/queue_allocator.rb:15:in `test_file_paths'
/workspace/vendor/bundle/ruby/2.3.0/gems/knapsack_pro-0.54.0/lib/knapsack_pro/runners/queue/base_runner.rb:21:in `test_file_paths'
/workspace/vendor/bundle/ruby/2.3.0/gems/knapsack_pro-0.54.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:28:in `run_tests'
/workspace/vendor/bundle/ruby/2.3.0/gems/knapsack_pro-0.54.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:24:in `run'
/workspace/vendor/bundle/ruby/2.3.0/gems/knapsack_pro-0.54.0/lib/tasks/queue/rspec.rake:6:in `block (3 levels) in <main>'
/workspace/vendor/bundle/ruby/2.3.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'

@ArturT ArturT merged commit b97c8a3 into master Jul 20, 2018
@ArturT ArturT deleted the fallback-mode-for-ETIMEDOUT branch July 20, 2018 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant