worker_scoreboard 0.0.4 → 0.0.5

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: 0f29ecafa714a3e969c3537b3b204b12b72bb652
4
- data.tar.gz: 44b354d486856a4aabfcd7f5a14ea801da0a87cc
3
+ metadata.gz: 9631adf5c6e18cc7e0caed8f2fadcd76aed81d1e
4
+ data.tar.gz: 37cf3fa1c169e09c3fe1a98413f8ca8ef82adc4d
5
5
  SHA512:
6
- metadata.gz: 4cf322b8fe1561725c8b6fa3fa330468ad7fcd9ac54cd8d0b5f927e5c37f696e19d2088e37289e13df0b3e3b6ade07a1a0a80cea012ee101bb131b741c68b8e2
7
- data.tar.gz: 8f8875afaf9c9ec290ddc7779e8cd96a852e01e80c549a910e4bc8e8e4192b789140cce661c2dbdb6cd40a1e83616fb278aa4394eae45ae6d301ca2ec2e1589e
6
+ metadata.gz: c4bf9bcf680b0f7cb2f896c9ff7d763a79f1bd272d7cf3c32ac66ac12be02fa9ff29d94a6f32d058131ba60caacf492b605f604b82ca6e07c4adf3f2c424af6b
7
+ data.tar.gz: 937b4bbf0bd811a81181d1fecc835d6e8a5978c9479bfc7686776a77770f21f33539e2641b09a367267021460864c4f79ca9323dd74deda3263644288514831c
@@ -79,7 +79,8 @@ class WorkerScoreboard
79
79
  files.each do |file|
80
80
  file =~ /\/status_(.*)$/ or next
81
81
  id = $1.to_i
82
- fh = File.open(file, 'r+b') or next
82
+ # ignore files removed after glob but before open
83
+ fh = File.open(file, 'r+b') rescue next
83
84
  if id != worker_id && fh.flock(File::LOCK_EX|File::LOCK_NB)
84
85
  fh.close
85
86
  begin
@@ -1,3 +1,3 @@
1
1
  class WorkerScoreboard
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worker_scoreboard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - SpringMT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-09 00:00:00.000000000 Z
11
+ date: 2017-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '2.0'
93
93
  requirements: []
94
94
  rubyforge_project:
95
- rubygems_version: 2.5.1
95
+ rubygems_version: 2.6.11
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: a scoreboard for monitoring status of many workers