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(pid, start_time, start_log_path) ⇒ GroongaProcess

Returns a new instance of GroongaProcess.



83
84
85
86
87
88
89
90
91
92
93
# File 'lib/groonga-query-log/command/check-crash.rb', line 83

def initialize(pid, start_time, start_log_path)
  @pid = pid
  @start_time = start_time
  @last_time = @start_time
  @start_log_path = start_log_path
  @last_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.



80
81
82
# File 'lib/groonga-query-log/command/check-crash.rb', line 80

def crashed=(value)
  @crashed = value
end

#finished=(value) ⇒ Object (writeonly)

Sets the attribute finished

Parameters:

  • value

    the value to set the attribute finished to.



81
82
83
# File 'lib/groonga-query-log/command/check-crash.rb', line 81

def finished=(value)
  @finished = value
end

#important_entriesObject (readonly)

Returns the value of attribute important_entries.



82
83
84
# File 'lib/groonga-query-log/command/check-crash.rb', line 82

def important_entries
  @important_entries
end

#last_log_pathObject

Returns the value of attribute last_log_path.



78
79
80
# File 'lib/groonga-query-log/command/check-crash.rb', line 78

def last_log_path
  @last_log_path
end

#last_timeObject

Returns the value of attribute last_time.



77
78
79
# File 'lib/groonga-query-log/command/check-crash.rb', line 77

def last_time
  @last_time
end

#n_leaksObject

Returns the value of attribute n_leaks.



79
80
81
# File 'lib/groonga-query-log/command/check-crash.rb', line 79

def n_leaks
  @n_leaks
end

#pidObject (readonly)

Returns the value of attribute pid.



74
75
76
# File 'lib/groonga-query-log/command/check-crash.rb', line 74

def pid
  @pid
end

#start_log_pathObject (readonly)

Returns the value of attribute start_log_path.



76
77
78
# File 'lib/groonga-query-log/command/check-crash.rb', line 76

def start_log_path
  @start_log_path
end

#start_timeObject (readonly)

Returns the value of attribute start_time.



75
76
77
# File 'lib/groonga-query-log/command/check-crash.rb', line 75

def start_time
  @start_time
end

Instance Method Details

#crashed?Boolean

Returns:

  • (Boolean)


95
96
97
# File 'lib/groonga-query-log/command/check-crash.rb', line 95

def crashed?
  @crashed
end

#finished?Boolean

Returns:

  • (Boolean)


99
100
101
# File 'lib/groonga-query-log/command/check-crash.rb', line 99

def finished?
  @finished
end

#successfully_finished?Boolean

Returns:

  • (Boolean)


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

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

  true
end