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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9911d8e7cd1e186fa678c4c0ca8b5235d91fa53a
4
- data.tar.gz: ac956ee07a9dd8bfb8e217fa291245c15506be42
3
+ metadata.gz: 0b681e918598f554d124a7b40ba2274f88f306d1
4
+ data.tar.gz: d6893059960ad48790d6b1c7890547028c1505fd
5
5
  SHA512:
6
- metadata.gz: 405828e79c6c1fcf769dafff8f273867f21d7e67d19a938c0b248a14c4334f92e39786c7aad84c8223dd218bbfbb7a803ffb074e6d3fc8442f9854b45e972359
7
- data.tar.gz: d91460ba6dbd6bf854d9f7204f161074354ec96fa477ff6691b4da949c02ab5f28795f08c5787861f3167c73650098825830b87f5217f8c29bb7ecf8f6e64cbc
6
+ metadata.gz: 50274afdd6df6234f81c071999597d032668ff558fcfa018eff8a41e0f0ab8165e7a3d70ab1e6170c30b8724e370c72fad68acb97e473221c7f36b4b5d8bb93d
7
+ data.tar.gz: 8339da867b213a6398bdb040306a8d23dbdbe0e5a3f885580e143cc99baf5166314e4dfc697c94799b44f770ddbbeb953f92a00612ffcb9b62e15873d87c8ffe
@@ -1,3 +1,3 @@
1
1
  class WorkerScoreboard
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -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.1
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-14 00:00:00.000000000 Z
11
+ date: 2015-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler