kurchatov 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbbbae27bc63fa4d288964473a0c40f7c5d287de
4
- data.tar.gz: b7b563070302caaef9fccfd31b418327c32c13c5
3
+ metadata.gz: 3491801f7a156bc9ac3b0b15f5b8ac349b5ea0c8
4
+ data.tar.gz: 6bb3727bce6b21b51a3a227938a6a9f14c86852c
5
5
  SHA512:
6
- metadata.gz: bf3a30e95ed5120216b5eca71954d66ddd4d66e2c8ba894d3fdb4b04530030fdd8143848a0351cc50694737450b08f2f6a69f8d62f76bd002afa706960baccc3
7
- data.tar.gz: ec916fe27d1cdbd386e2854f1bcc2d620f265eaf4cb57a072cdc5383b97fb67eebb305d50007f7d595f0eb65a116714104bf1e57c6b49567551d39896c490422
6
+ metadata.gz: 8e9f5becda3504f709e8f653776c410021ef99c457cbc2643ccb1d692d9cc255803dafcfbe0887eaec2e33065b76dff7b6621e3c763f013afb91cae28afa5c83
7
+ data.tar.gz: 4d983e2443cc8ae526719f3c9718933ae486a71cdb67dc221940fe6fdaaac611188631d1bebb0295d7440554396b52ea9a3f47db136e39a535dd014b2dfe8b2e
@@ -32,10 +32,12 @@ module Kurchatov
32
32
  end
33
33
 
34
34
  def died?
35
- return false if @thread.alive?
35
+ if @thread.alive?
36
+ @last_error_count = 0
37
+ return false
38
+ end
36
39
  # thread died, join and extract error
37
40
  begin
38
- @last_error_count = 0
39
41
  @thread.join # call error
40
42
  rescue => e
41
43
  desc = "Plugin '#{@plugin.name}' died. #{e.class}: #{e}\n." +
@@ -49,10 +51,14 @@ module Kurchatov
49
51
  event(:service => "plugin #{@plugin.name} errors", :desc => desc, :state => 'critical')
50
52
  end
51
53
  end
52
- @thread = Thread.new { @plugin.start! }
54
+ start! #FIXME
53
55
  true
54
56
  end
55
57
 
58
+ def start!
59
+ @thread = Thread.new { @plugin.start! }
60
+ end
61
+
56
62
  end
57
63
 
58
64
  attr_accessor :tasks
@@ -1,3 +1,3 @@
1
1
  module Kurchatov
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
data/tests/run.sh CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/bin/sh -e
2
2
  bundle exec ruby ./tests/server.rb &
3
- bundle exec kurchatov -c ./tests/data/config.yml -d ./tests/data -H 127.0.0.1 --stop-on-error --http 127.0.0.1:55755
3
+ bundle exec kurchatov -c ./tests/data/config.yml -d ./tests/data -H 127.0.0.1 --http 127.0.0.1:55755
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kurchatov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasiliev Dmitry