Class: Eye::Dsl::ProcessOpts
- Defined in:
- lib/eye/dsl/process_opts.rb
Constant Summary
Constants inherited from Opts
Opts::BOOL_OPTIONS, Opts::INTERVAL_OPTIONS, Opts::STR_OPTIONS
Class Attribute Summary collapse
-
.unique_num ⇒ Object
Returns the value of attribute unique_num.
Attributes inherited from PureOpts
#config, #full_name, #name, #parent
Instance Method Summary collapse
- #application ⇒ Object (also: #app)
- #depend_on(names, opts = {}) ⇒ Object
- #monitor_children(&block) ⇒ Object
Methods inherited from Opts
#checks, #clear_bundler_env, #command, #daemonize!, #initialize, #load_env, #nochecks, #nonotify, #notify, #notriggers, #scoped, #set_environment, #set_gid, #set_stdall, #set_stop_command, #set_uid, #skip_group_action, #stop_signals, #stop_signals=, #syslog, #triggers, #with_server
Methods inherited from PureOpts
#allow_options, create_options_methods, #disallow_options, #initialize, #nop, #not_seed_options, #use, #with_condition, with_parsed_file
Constructor Details
This class inherits a constructor from Eye::Dsl::Opts
Class Attribute Details
.unique_num ⇒ Object
Returns the value of attribute unique_num.
40 41 42 |
# File 'lib/eye/dsl/process_opts.rb', line 40 def unique_num @unique_num end |
Instance Method Details
#application ⇒ Object Also known as: app
12 13 14 |
# File 'lib/eye/dsl/process_opts.rb', line 12 def application parent.try(:parent) end |
#depend_on(names, opts = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/eye/dsl/process_opts.rb', line 18 def depend_on(names, opts = {}) names = Array(names).map(&:to_s) trigger("wait_dependency_#{unique_num}", { names: names }.merge(opts)) nm = @config[:name] names.each do |name| parent.process(name) do trigger("check_dependency_#{unique_num}", names: [nm]) end end skip_group_action(:restart, [:up, :down, :starting, :stopping, :restarting]) end |
#monitor_children(&block) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/eye/dsl/process_opts.rb', line 3 def monitor_children(&block) opts = Eye::Dsl::ChildProcessOpts.new opts.instance_eval(&block) if block @config[:monitor_children] ||= {} Eye::Utils.deep_merge!(@config[:monitor_children], opts.config) end |