Class: Runners::Docker::CreateConnection

Inherits:
Object
  • Object
show all
Defined in:
app/services/runners/docker/create_connection.rb

Instance Method Summary collapse

Instance Method Details

#perform(node:) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'app/services/runners/docker/create_connection.rb', line 6

def perform(node:)
  raise(Runners::InvalidRunner, "Node must be a docker runner") unless node.docker?

  ::Docker::Connection.new(
    node.hostname,
    connect_timeout: 5,
    read_timeout: 15,
    write_timeout: 5
  )
end