Module: Luban::Deployment::Parameters::Application

Extended by:
Base
Included in:
Application, Luban::Deployment::Package::Base, Worker::Base
Defined in:
lib/luban/deployment/parameters.rb

Constant Summary collapse

DefaultLogrotateMaxAge =

days

7
DefaultLogrotateInterval =

mins

10

Instance Method Summary collapse

Methods included from Base

parameter

Instance Method Details

#env_nameObject



122
123
124
# File 'lib/luban/deployment/parameters.rb', line 122

def env_name
  @env_name ||= "#{stage}.#{project}/#{application}"
end

#logrotate_countObject



134
135
136
# File 'lib/luban/deployment/parameters.rb', line 134

def logrotate_count
  logrotate_max_age * 24 * (60 / logrotate_interval)
end

#monitor_itself?Boolean

Returns:

  • (Boolean)


126
127
128
# File 'lib/luban/deployment/parameters.rb', line 126

def monitor_itself?
  env_name == process_monitor[:env]
end

#monitorable?Boolean

Returns:

  • (Boolean)


130
131
132
# File 'lib/luban/deployment/parameters.rb', line 130

def monitorable?
  monitor_defined? and !monitor_itself?
end