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 +4 -4
- data/lib/bipbip/agent.rb +1 -19
- data/lib/bipbip/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 371c76ef92959884a4bc30a05af7e1c845d5f6ca
|
4
|
+
data.tar.gz: 647c465bed69c57649772dcee88331155ba2e470
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
data/lib/bipbip/version.rb
CHANGED
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.
|
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
|
13
|
+
date: 2015-07-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: copperegg-revealmetrics
|