worker_scoreboard 0.0.2 → 0.0.3

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: 0b681e918598f554d124a7b40ba2274f88f306d1
4
- data.tar.gz: d6893059960ad48790d6b1c7890547028c1505fd
3
+ metadata.gz: 97bae84d1b5c2d98ecc13fe7babd2414b06534a8
4
+ data.tar.gz: 1b770230a1a052d3bc6d4c9a40544c5b24d8a969
5
5
  SHA512:
6
- metadata.gz: 50274afdd6df6234f81c071999597d032668ff558fcfa018eff8a41e0f0ab8165e7a3d70ab1e6170c30b8724e370c72fad68acb97e473221c7f36b4b5d8bb93d
7
- data.tar.gz: 8339da867b213a6398bdb040306a8d23dbdbe0e5a3f885580e143cc99baf5166314e4dfc697c94799b44f770ddbbeb953f92a00612ffcb9b62e15873d87c8ffe
6
+ metadata.gz: 98a517d540b02b8d11bca78424537d74568dc9fa74b6060149e84286d14bd48c0d0229fafc7e4f01226f3dbd7eae0bd4d07b86365d65d70f010737dba2eaf452
7
+ data.tar.gz: caddb30a3d7bbbe5e177914f2a91ec6e4c9d53b58a495eebe0a18ce2c7e1637ed29e1b25c82bbd13984b79a7dd45dd92ddb2c91689a01fc8a37b202e238d8e11
@@ -81,7 +81,11 @@ class WorkerScoreboard
81
81
  fh = File.open(file, 'r+b') or next
82
82
  if id != worker_id && fh.flock(File::LOCK_EX|File::LOCK_NB)
83
83
  fh.close
84
- File.unlink file or not $! === Errno::ENOENT and warn "failed to remove an obsolete scoreboard file:#{file}:#{$!}"
84
+ begin
85
+ File.unlink file
86
+ rescue => e
87
+ warn "failed to remove an obsolete scoreboard file:#{file}:#{$!}" unless e === Errno::ENOENT
88
+ end
85
89
  next
86
90
  end
87
91
  yield id, fh
@@ -1,3 +1,3 @@
1
1
  class WorkerScoreboard
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - SpringMT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-17 00:00:00.000000000 Z
11
+ date: 2015-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler