Sha256: 84f7b5e9eaef7bb1db48012822135a1f4acca2ac95dd51e6b58ae77623b151c0
Contents?: true
Size: 715 Bytes
Versions: 18
Compression:
Stored size: 715 Bytes
Contents
# frozen_string_literal: true require "datadog/core/worker" require "datadog/core/workers/async" # general purpose async worker for CI # executes given task once in separate thread module Datadog module CI class Worker < Datadog::Core::Worker include Datadog::Core::Workers::Async::Thread DEFAULT_SHUTDOWN_TIMEOUT = 60 DEFAULT_WAIT_TIMEOUT = 60 def stop(timeout = DEFAULT_SHUTDOWN_TIMEOUT) join(timeout) end def wait_until_done(timeout = DEFAULT_WAIT_TIMEOUT) join(timeout) end def done? started? && !running? end end class DummyWorker < Worker def initialize super { nil } end end end end
Version data entries
18 entries across 18 versions & 1 rubygems