jflow 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jflow/cli.rb +2 -13
- data/lib/jflow/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49c73bd7ddc1961e2cee02340e5e278ca38728b6
|
4
|
+
data.tar.gz: d24a8c760b838ead40d337d6ba3942ae08ed1e7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f0511d6ff5150fdc07d1a7d6bcb57a50def52f2b0f8cd52bd8cc08bf0cfc79f1779e139edef360004cd63a5b75260ef19cc28d89940ae75666123e304dfcaee
|
7
|
+
data.tar.gz: af71fc5d74cdcd66f762ea16ff011c40ba773721b2e136765086998d1de3e00a15c4c495f1a6696d675d312acf43b41e3d200c5ca5b02fb6e5649d33db59fe42
|
data/lib/jflow/cli.rb
CHANGED
@@ -44,14 +44,12 @@ module JFlow
|
|
44
44
|
# Shutting down workers will take a exactly 60 secs in all cases.
|
45
45
|
def shutdown_workers
|
46
46
|
log "Sending kill signal to running threads. Please wait for current polling to finish"
|
47
|
-
kill_threads = []
|
48
47
|
worker_threads.each do |thread|
|
49
48
|
thread.mark_for_shutdown
|
50
|
-
if thread.currently_working?
|
51
|
-
|
49
|
+
if thread.currently_working? && thread.alive?
|
50
|
+
thread.raise("Workers are going down!")
|
52
51
|
end
|
53
52
|
end
|
54
|
-
kill_threads.each(&:join)
|
55
53
|
end
|
56
54
|
|
57
55
|
private
|
@@ -77,15 +75,6 @@ module JFlow
|
|
77
75
|
end
|
78
76
|
end
|
79
77
|
|
80
|
-
def kill_thread(thread)
|
81
|
-
Thread.new do
|
82
|
-
sleep 60
|
83
|
-
if thread.alive?
|
84
|
-
thread.raise("Workers are going down!")
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
78
|
def log(str)
|
90
79
|
JFlow.configuration.logger.info str
|
91
80
|
end
|
data/lib/jflow/version.rb
CHANGED