Module: Einhorn::State

Extended by:
AbstractState
Defined in:
lib/einhorn.rb

Class Method Summary collapse

Methods included from AbstractState

default_state, dumpable_state, method_missing, state, state=

Class Method Details

.default_stateObject

WARNING: Don’t change or remove these variables without thinking about backwards/forwards compatibility for upgrades/downgrades



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/einhorn.rb', line 38

def self.default_state
  {
    :children => {},
    :config => {:number => 1, :backlog => 100, :seconds => 1},
    :versions => {},
    :version => 0,
    :sockets => {},
    :orig_cmd => nil,
    :bind => [],
    :bind_fds => [],
    :cmd => nil,
    :script_name => nil,
    :respawn => true,
    :upgrading => false,
    :smooth_upgrade => false,
    :reloading_for_upgrade => false,
    :path => nil,
    :cmd_name => nil,
    :verbosity => 1,
    :generation => 0,
    :last_spinup => nil,
    :ack_mode => {:type => :timer, :timeout => 1},
    :kill_children_on_exit => false,
    :command_socket_as_fd => false,
    :socket_path => nil,
    :pidfile => nil,
    :lockfile => nil,
    :consecutive_deaths_before_ack => 0,
    :last_upgraded => nil,
    :nice => {:master => nil, :worker => nil, :renice_cmd => '/usr/bin/renice'},
    :reexec_commandline => nil,
    :drop_environment_variables => [],
    :signal_timeout => nil,
  }
end

.dumpable_stateObject



74
75
76
77
78
# File 'lib/einhorn.rb', line 74

def self.dumpable_state
  dump = state
  dump[:reloading_for_preload_upgrade] = dump[:reloading_for_upgrade]
  dump
end