Class: GroongaQueryLog::Command::CheckCrash::GroongaProcess

Inherits:
Object
  • Object
show all
Defined in:
lib/groonga-query-log/command/check-crash.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(version, pid, start_time, start_log_path) ⇒ GroongaProcess

Returns a new instance of GroongaProcess.



113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/groonga-query-log/command/check-crash.rb', line 113

def initialize(version, pid, start_time, start_log_path)
  @version = version
  @pid = pid
  @start_time = start_time
  @end_time = @start_time
  @start_log_path = start_log_path
  @end_log_path = @start_log_path
  @n_leaks = 0
  @crashed = false
  @finished = false
  @important_entries = []
end

Instance Attribute Details

#crashed=(value) ⇒ Object (writeonly)

Sets the attribute crashed

Parameters:

  • value

    the value to set the attribute crashed to.



110
111
112
# File 'lib/groonga-query-log/command/check-crash.rb', line 110

def crashed=(value)
  @crashed = value
end

#end_log_pathObject

Returns the value of attribute end_log_path.



108
109
110
# File 'lib/groonga-query-log/command/check-crash.rb', line 108

def end_log_path
  @end_log_path
end

#end_timeObject

Returns the value of attribute end_time.



107
108
109
# File 'lib/groonga-query-log/command/check-crash.rb', line 107

def end_time
  @end_time
end

#finished=(value) ⇒ Object (writeonly)

Sets the attribute finished

Parameters:

  • value

    the value to set the attribute finished to.



111
112
113
# File 'lib/groonga-query-log/command/check-crash.rb', line 111

def finished=(value)
  @finished = value
end

#important_entriesObject (readonly)

Returns the value of attribute important_entries.



112
113
114
# File 'lib/groonga-query-log/command/check-crash.rb', line 112

def important_entries
  @important_entries
end

#n_leaksObject

Returns the value of attribute n_leaks.



109
110
111
# File 'lib/groonga-query-log/command/check-crash.rb', line 109

def n_leaks
  @n_leaks
end

#pidObject (readonly)

Returns the value of attribute pid.



104
105
106
# File 'lib/groonga-query-log/command/check-crash.rb', line 104

def pid
  @pid
end

#start_log_pathObject (readonly)

Returns the value of attribute start_log_path.



106
107
108
# File 'lib/groonga-query-log/command/check-crash.rb', line 106

def start_log_path
  @start_log_path
end

#start_timeObject (readonly)

Returns the value of attribute start_time.



105
106
107
# File 'lib/groonga-query-log/command/check-crash.rb', line 105

def start_time
  @start_time
end

#versionObject (readonly)

Returns the value of attribute version.



103
104
105
# File 'lib/groonga-query-log/command/check-crash.rb', line 103

def version
  @version
end

Instance Method Details

#crashed?Boolean

Returns:

  • (Boolean)


126
127
128
# File 'lib/groonga-query-log/command/check-crash.rb', line 126

def crashed?
  @crashed
end

#finished?Boolean

Returns:

  • (Boolean)


130
131
132
# File 'lib/groonga-query-log/command/check-crash.rb', line 130

def finished?
  @finished
end

#successfully_finished?Boolean

Returns:

  • (Boolean)


134
135
136
137
138
139
# File 'lib/groonga-query-log/command/check-crash.rb', line 134

def successfully_finished?
  return false if crashed?
  return false unless finished?

  true
end