Class: Sv::Config
- Inherits:
-
Object
show all
- Includes:
- Logger
- Defined in:
- lib/sv/config.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Logger
logger, #logger, stderr, #stderr
Constructor Details
#initialize(app_dir) ⇒ Config
Returns a new instance of Config.
12
13
14
15
16
17
|
# File 'lib/sv/config.rb', line 12
def initialize(app_dir)
@app_dir = app_dir
@instances = {}
@working_dir = app_dir
@namespace = SecureRandom.hex(3)
end
|
Instance Attribute Details
#app_dir ⇒ Object
Returns the value of attribute app_dir.
10
11
12
|
# File 'lib/sv/config.rb', line 10
def app_dir
@app_dir
end
|
Instance Method Details
#jobs ⇒ Object
31
32
33
34
35
36
|
# File 'lib/sv/config.rb', line 31
def jobs
@jobs ||= begin
load_from_file
jobs_map.values
end
end
|
#logfile ⇒ Object
27
28
29
|
# File 'lib/sv/config.rb', line 27
def logfile
@logfile ||= "#{app_dir}/log/supervisord.log"
end
|
#pidfile ⇒ Object
23
24
25
|
# File 'lib/sv/config.rb', line 23
def pidfile
@pidfile ||= "#{app_dir}/tmp/pids/supervisor.pid"
end
|
#socket_path ⇒ Object
19
20
21
|
# File 'lib/sv/config.rb', line 19
def socket_path
@socket_path ||= "#{app_dir}/tmp/sockets/supervisor.sock"
end
|