Class: Datadog::CI::Worker

Inherits:
Datadog::Core::Worker
  • Object
show all
Includes:
Datadog::Core::Workers::Async::Thread
Defined in:
lib/datadog/ci/worker.rb

Direct Known Subclasses

DummyWorker

Constant Summary collapse

DEFAULT_SHUTDOWN_TIMEOUT =
60
DEFAULT_WAIT_TIMEOUT =
60

Instance Method Summary collapse

Instance Method Details

#done?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/datadog/ci/worker.rb', line 24

def done?
  started? && !running?
end

#stop(timeout = DEFAULT_SHUTDOWN_TIMEOUT) ⇒ Object



16
17
18
# File 'lib/datadog/ci/worker.rb', line 16

def stop(timeout = DEFAULT_SHUTDOWN_TIMEOUT)
  join(timeout)
end

#wait_until_done(timeout = DEFAULT_WAIT_TIMEOUT) ⇒ Object



20
21
22
# File 'lib/datadog/ci/worker.rb', line 20

def wait_until_done(timeout = DEFAULT_WAIT_TIMEOUT)
  join(timeout)
end