scout_agent 3.1.8 → 3.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,10 @@
1
+ == 3.1.9
2
+
3
+ * Restoring some error handling code that was accidentally disabled
4
+ * Fixed an issue where the agent could accidentally launch a duplicate process
5
+ * Fixed an issue that prevented the agent from forcing a stop when a process
6
+ would timeout on a signal response
7
+
1
8
  == 3.1.8
2
9
 
3
10
  * Switching XMPP default to off until we enable that feature
@@ -28,7 +28,7 @@ module ScoutAgent
28
28
 
29
29
  # Ensure we are the only process with this name running.
30
30
  def authorize
31
- IDCard.new(file_name).authorize
31
+ IDCard.new(file_name).authorize or exit(1)
32
32
  end
33
33
 
34
34
  #
@@ -169,9 +169,9 @@ module ScoutAgent
169
169
  begin
170
170
  Timeout.timeout(pause) {
171
171
  begin
172
- return ::Process.wait2(child_pid).last # response to signal
173
- rescue Exception => error # no such child
174
- raise if error.is_a? Timeout::Error # reraise timeouts
172
+ return ::Process.wait2(child_pid).last # signal response
173
+ rescue Exception => error # no such child
174
+ raise if error.is_a? Timeout::ExitException # reraise timeouts
175
175
  return nil # we have already caught the child
176
176
  end
177
177
  }
@@ -179,9 +179,9 @@ module ScoutAgent
179
179
  rescue Amalgalite::SQLite3::Error => error # failed to +VACUUM+ database
180
180
  log.error("Database maintenance error: #{error.message}.")
181
181
  nil # maintenance failed, we will try again later
182
- # rescue Exception => error # file locking error
183
- # log.error("Database maintenance locking error: #{error.message}.")
184
- # nil # maintenance failed, we will try again later
182
+ rescue Exception => error # file locking error
183
+ log.error("Database maintenance locking error: #{error.message}.")
184
+ nil # maintenance failed, we will try again later
185
185
  end
186
186
 
187
187
  # Returns +true+ if this connection is currently read locked.
@@ -111,7 +111,7 @@ module ScoutAgent
111
111
  if pid.flock(File::LOCK_EX | File::LOCK_NB)
112
112
  if pid.read =~ /\A\d+/
113
113
  begin
114
- signal(0) # check for the existing process
114
+ signal(0) # check for the existing process
115
115
  rescue Errno::ESRCH # no such process
116
116
  # stale PID file found, clearing it and reloading
117
117
  if revoke
data/lib/scout_agent.rb CHANGED
@@ -91,7 +91,7 @@ module ScoutAgent
91
91
  end
92
92
 
93
93
  # The version of this agent.
94
- VERSION = "3.1.8".freeze
94
+ VERSION = "3.1.9".freeze
95
95
  # A Pathname reference to the agent code directory, used in dynamic loading.
96
96
  LIB_DIR = Pathname.new(File.dirname(__FILE__)) + agent_name
97
97
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.8
4
+ version: 3.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Edward Gray II
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2009-05-14 00:00:00 -05:00
15
+ date: 2009-05-21 00:00:00 -05:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency