jflow 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84c92ec92f3ac08cdee6460fef0f82ccbebd219a
4
- data.tar.gz: d154e8252ff79dcc26857aff3a1011c4e3d02060
3
+ metadata.gz: 49c73bd7ddc1961e2cee02340e5e278ca38728b6
4
+ data.tar.gz: d24a8c760b838ead40d337d6ba3942ae08ed1e7c
5
5
  SHA512:
6
- metadata.gz: 922574473a201ff69d570163b4351b9793be004397de222e4cddce7df60401b174c2cbbcbc49a77e2eb4c98ccc36468698d1adc1862672f06be05a459fbbde5b
7
- data.tar.gz: 31eda7e1420f2aa1cb0ccc710daec88ddc5eca141b8bbcd9a927ef1e7cb5a35581dd7e17a79196e816c061b42a16b7a0c46cc79bf1b73c84ca0f758a8539e60a
6
+ metadata.gz: 4f0511d6ff5150fdc07d1a7d6bcb57a50def52f2b0f8cd52bd8cc08bf0cfc79f1779e139edef360004cd63a5b75260ef19cc28d89940ae75666123e304dfcaee
7
+ data.tar.gz: af71fc5d74cdcd66f762ea16ff011c40ba773721b2e136765086998d1de3e00a15c4c495f1a6696d675d312acf43b41e3d200c5ca5b02fb6e5649d33db59fe42
@@ -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
- kill_threads << kill_thread(thread)
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
@@ -1,3 +1,3 @@
1
1
  module JFlow
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christophe Verbinnen