Module: DatWorkerPool::Worker

Defined in:
lib/dat-worker-pool/worker.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods, TestHelpers

Constant Summary collapse

STANDARD_ERROR_CLASSES =

these are standard error classes that we rescue, handle and don’t reraise in the work loop, this keeps the worker thread from shutting down unexpectedly; LoadError, NotImplementedError and Timeout::Error are common non StandardError exception that should be treated like a StandardError, we don’t want one of these to shutdown a worker thread

[
  StandardError,
  LoadError,
  NotImplementedError,
  Timeout::Error
].freeze

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



21
22
23
24
25
26
# File 'lib/dat-worker-pool/worker.rb', line 21

def self.included(klass)
  klass.class_eval do
    extend ClassMethods
    include InstanceMethods
  end
end