Class: Procrastinator::Scheduler::WorkProxy

Inherits:
Object
  • Object
show all
Includes:
DaemonWorking, SerialWorking, ThreadedWorking
Defined in:
lib/procrastinator/scheduler.rb

Overview

DSL grammar object to enable chaining #work with the three work modes.

See Also:

Constant Summary

Constants included from DaemonWorking

DaemonWorking::DEFAULT_PID_DIR, DaemonWorking::MAX_PROC_LEN, DaemonWorking::PID_EXT

Constants included from ThreadedWorking

ThreadedWorking::PROG_NAME

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DaemonWorking

#daemonized!, halt!, normalize_pid, running?

Methods included from ThreadedWorking

#threaded

Methods included from SerialWorking

#serially

Constructor Details

#initialize(workers, config) ⇒ WorkProxy

Returns a new instance of WorkProxy.



391
392
393
394
# File 'lib/procrastinator/scheduler.rb', line 391

def initialize(workers, config)
   @workers = workers
   @config  = config
end

Instance Attribute Details

#workersObject (readonly)

Returns the value of attribute workers.



389
390
391
# File 'lib/procrastinator/scheduler.rb', line 389

def workers
  @workers
end