worker_scoreboard 0.0.1 → 0.0.2
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/version.rb +1 -1
- data/lib/worker_scoreboard.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: 0b681e918598f554d124a7b40ba2274f88f306d1
|
4
|
+
data.tar.gz: d6893059960ad48790d6b1c7890547028c1505fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50274afdd6df6234f81c071999597d032668ff558fcfa018eff8a41e0f0ab8165e7a3d70ab1e6170c30b8724e370c72fad68acb97e473221c7f36b4b5d8bb93d
|
7
|
+
data.tar.gz: 8339da867b213a6398bdb040306a8d23dbdbe0e5a3f885580e143cc99baf5166314e4dfc697c94799b44f770ddbbeb953f92a00612ffcb9b62e15873d87c8ffe
|
data/lib/worker_scoreboard.rb
CHANGED
@@ -77,7 +77,7 @@ class WorkerScoreboard
|
|
77
77
|
files = Dir.glob("#{@base_dir}/status_*")
|
78
78
|
files.each do |file|
|
79
79
|
file =~ /\/status_(.*)$/ or next
|
80
|
-
id = $1
|
80
|
+
id = $1.to_i
|
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
|
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.2
|
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-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|