Class: Collective::Policy

Inherits:
Object
  • Object
show all
Defined in:
lib/collective/policy.rb

Defined Under Namespace

Classes: Instance

Constant Summary collapse

DEFAULTS =
{
  pool_min_workers:       1,
  pool_max_workers:       10,
  worker_idle_max_sleep:  64.0,
  worker_idle_min_sleep:  0.125,
  worker_idle_spin_down:  900,
  worker_none_spin_up:    86400,
  worker_max_jobs:        100,    # a worker should automatically exit after this many jobs
  worker_max_lifetime:    1000,   # a worker should automatically exit after this time
  worker_late:            10,     # a worker is overdue after this time with no heartbeat
  worker_hung:            100,    # a worker will be killed after this time
  storage:                :mock,
  observers:              []
}

Class Method Summary collapse

Class Method Details

.resolve(options = {}) ⇒ Object



61
62
63
64
# File 'lib/collective/policy.rb', line 61

def resolve( options = {} )
  # this will dup either an Instance or a Hash
  Collective::Policy::Instance.new(options.dup)
end