bipbip 0.6.3 → 0.6.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: 903f0fcc7627ac2f7ae11eb4799874ff4d8ac12b
4
- data.tar.gz: 979821f35e2579f5ffb46a222b672d171a5a9479
3
+ metadata.gz: 371c76ef92959884a4bc30a05af7e1c845d5f6ca
4
+ data.tar.gz: 647c465bed69c57649772dcee88331155ba2e470
5
5
  SHA512:
6
- metadata.gz: 7f4d6cf452d1255fc060d3b9808b1c4e0efbb78cfc8a3d9e3cd6e412f8934d639295fb0d43a1c53848685f0c930b80f33ad641c66921beddb00712f8aa773e41
7
- data.tar.gz: 635917563b706c5c67b4b59c3067f5842cfe8f10645dea0798ebd632d070ccaab5971071971a44b1be62f35aeae413ede02eb441f3407d2ff78e5adb766c1afa
6
+ metadata.gz: 57d96b3fa91f4ea3d441cea3c834afe525da70c4bc28f0cfcd895177cd43f0ea1b5bf3d2294b38c541dc13acba118fb55b8a008d988176f256b4d81fd0cf077d
7
+ data.tar.gz: d27729461108b86ca74208839eeb67e1c9c8fe756d5acf3b7878c1b09285e30547c9a8a7f0000d41807a1c185dde2e17454ddc0da55f4e55324182b8a50df386
data/lib/bipbip/agent.rb CHANGED
@@ -33,28 +33,18 @@ module Bipbip
33
33
  end
34
34
  end
35
35
 
36
- ['INT', 'TERM'].each do |sig|
37
- trap(sig) do
38
- Bipbip.logger.info "Received signal #{sig}, interrupting..."
39
- interrupt
40
- end
41
- end
42
-
43
36
  @plugins.each do |plugin|
44
37
  Bipbip.logger.info "Starting plugin #{plugin.name} with config #{plugin.config}"
45
38
  start_plugin(plugin, @storages)
46
39
  end
47
40
 
48
- @interrupted = false
49
- until @interrupted
41
+ while true
50
42
  thread = ThreadsWait.new(@threads).next_wait
51
43
  @threads.delete(thread)
52
44
  plugin = thread['plugin']
53
- next if @interrupted
54
45
 
55
46
  Bipbip.logger.error "Plugin #{plugin.name} with config #{plugin.config} terminated. Restarting..."
56
47
  interruptible_sleep(PLUGIN_RESPAWN_DELAY)
57
- next if @interrupted
58
48
 
59
49
  # Re-instantiate plugin to get rid of existing database-connections etc
60
50
  plugin_new = Bipbip::Plugin.factory_from_plugin(plugin)
@@ -64,14 +54,6 @@ module Bipbip
64
54
  end
65
55
  end
66
56
 
67
- def interrupt
68
- @interrupted = true
69
- @threads.each do |thread|
70
- thread.terminate
71
- end
72
- interrupt_sleep
73
- end
74
-
75
57
  private
76
58
 
77
59
  # @param [Bipbip::Plugin] plugin
@@ -1,3 +1,3 @@
1
1
  module Bipbip
2
- VERSION = '0.6.3'
2
+ VERSION = '0.6.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bipbip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cargo Media
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-06-22 00:00:00.000000000 Z
13
+ date: 2015-07-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: copperegg-revealmetrics