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 +4 -4
- data/lib/worker_scoreboard.rb +5 -1
- data/lib/worker_scoreboard/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: 97bae84d1b5c2d98ecc13fe7babd2414b06534a8
|
4
|
+
data.tar.gz: 1b770230a1a052d3bc6d4c9a40544c5b24d8a969
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98a517d540b02b8d11bca78424537d74568dc9fa74b6060149e84286d14bd48c0d0229fafc7e4f01226f3dbd7eae0bd4d07b86365d65d70f010737dba2eaf452
|
7
|
+
data.tar.gz: caddb30a3d7bbbe5e177914f2a91ec6e4c9d53b58a495eebe0a18ce2c7e1637ed29e1b25c82bbd13984b79a7dd45dd92ddb2c91689a01fc8a37b202e238d8e11
|
data/lib/worker_scoreboard.rb
CHANGED
@@ -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
|
-
|
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
|
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
|
+
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-
|
11
|
+
date: 2015-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|