Class: Pm::Manager

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

Overview

Manager is used to start and control processes

Class Method Summary collapse

Class Method Details

.configObject



111
112
113
114
115
116
117
# File 'lib/flow.rb', line 111

def self.config
  @config ||= begin
    conf = Config.new
    conf.load
    conf
  end
end

.start(tag, context, configuration = nil) ⇒ Object



119
120
121
122
123
124
125
126
# File 'lib/flow.rb', line 119

def self.start(tag, context, configuration = nil)
  @config = configuration unless configuration.nil?

  process_config = config.config[tag]
  process = Process.new(process_config, context)
  process.start
  process
end