iyyov 1.1.3-java → 1.1.4-java

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc CHANGED
@@ -1,7 +1,15 @@
1
+ === 1.1.4 (2012-9-15)
2
+ * Upgrade/broaden to slf4j [1.6.5,1.8), logback ~> 1.2
3
+ * Only stop old daemons when either (a) they are no longer in the
4
+ newly configured context, or (b) with exec_key changed and a passing
5
+ pre_check. This avoids an install failure from terminating a
6
+ functional (older) version.
7
+ * Call super in Context.initialize, for better support of late mixins.
8
+
1
9
  === 1.1.3 (2012-1-15)
2
10
  * Add task on call to block for log access, etc.
3
11
  * Fix handling of Gem::LoadError on reload of jobs.rb extended with a
4
- daemon who's gem is not currently installed. Previously this was
12
+ daemon who's gem is not currently installed. Previously this was a
5
13
  fatal error.
6
14
  * Upgrade to tarpit ~> 2.0, bundler Gemfile, gemspec (build)
7
15
 
data/init/iyyov CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  require 'rubygems'
26
26
 
27
- gem( "iyyov", "= 1.1.3" )
27
+ gem( "iyyov", "= 1.1.4" )
28
28
 
29
29
  require 'rjack-logback'
30
30
  RJack::Logback.config_console( :full => true, :thread => true )
data/lib/iyyov.rb CHANGED
@@ -57,11 +57,16 @@ module Iyyov
57
57
 
58
58
  if old_context
59
59
  if all_success
60
- # Stop old daemons that are no longer in the newly configured
61
- # context, or who's exec_key has changed
60
+ # Stop old daemons that are either:
61
+ # - no longer in the newly configured context, OR:
62
+ # - with exec_key changed AND a passing pre_check
62
63
  old_context.daemons.each do |name,odaemon|
63
64
  ndaemon = @context.daemons[name]
64
- odaemon.stop unless ndaemon && ndaemon.exec_key == odaemon.exec_key
65
+ if ( ndaemon.nil? ||
66
+ ( ndaemon.pre_check &&
67
+ ( ndaemon.exec_key != odaemon.exec_key ) ) )
68
+ odaemon.stop
69
+ end
65
70
  end
66
71
  else
67
72
  @context = old_context
data/lib/iyyov/base.rb CHANGED
@@ -16,5 +16,5 @@
16
16
 
17
17
  module Iyyov
18
18
  # Iyyov version
19
- VERSION = '1.1.3'
19
+ VERSION = '1.1.4'
20
20
  end
data/lib/iyyov/context.rb CHANGED
@@ -56,6 +56,8 @@ module Iyyov
56
56
  attr_reader :daemons
57
57
 
58
58
  def initialize
59
+ super
60
+
59
61
  @base_dir = "/opt/var"
60
62
  @make_run_dir = true
61
63
  @stop_on_exit = false
data/lib/iyyov/daemon.rb CHANGED
@@ -261,6 +261,19 @@ module Iyyov
261
261
  false
262
262
  end
263
263
 
264
+ # Return true if passes initial checks for start. This includes
265
+ # gem availability and/or if the exe_path is executable,
266
+ # i.e. everything that can be checked *before* starting.
267
+ def pre_check
268
+ epath = File.expand_path( exe_path )
269
+ is_exec = File.executable?( epath )
270
+ @log.warn( "#{epath} is not executable" ) unless is_exec
271
+ is_exec
272
+ rescue Gem::LoadError, Gem::GemNotFoundException, Errno::ENOENT => e
273
+ @log.warn( e.to_s )
274
+ false
275
+ end
276
+
264
277
  # Return array suitable for comparing this daemon with prior
265
278
  # running instance.
266
279
  def exec_key
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: iyyov
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.1.3
5
+ version: 1.1.4
6
6
  platform: java
7
7
  authors:
8
8
  - David Kellum
@@ -10,16 +10,19 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-01-15 00:00:00 Z
13
+ date: 2012-09-15 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rjack-slf4j
17
17
  version_requirements: &id001 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
- - - ~>
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.6.5
23
+ - - <
21
24
  - !ruby/object:Gem::Version
22
- version: 1.6.1
25
+ version: "1.8"
23
26
  requirement: *id001
24
27
  prerelease: false
25
28
  type: :runtime
@@ -30,7 +33,7 @@ dependencies:
30
33
  requirements:
31
34
  - - ~>
32
35
  - !ruby/object:Gem::Version
33
- version: "1.1"
36
+ version: "1.2"
34
37
  requirement: *id002
35
38
  prerelease: false
36
39
  type: :runtime
@@ -146,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
149
  requirements: []
147
150
 
148
151
  rubyforge_project:
149
- rubygems_version: 1.8.11
152
+ rubygems_version: 1.8.15
150
153
  signing_key:
151
154
  specification_version: 3
152
155
  summary: Down-to-earth job control and monitoring.