utils 0.0.63 → 0.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/bin/probe +23 -2
  3. data/lib/utils/version.rb +1 -1
  4. data/utils.gemspec +1 -1
  5. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.63
1
+ 0.0.64
data/bin/probe CHANGED
@@ -48,13 +48,34 @@ $opt['h'] and usage
48
48
  uri = "druby://localhost:#{$opt['p'] || 6623}"
49
49
 
50
50
  if $opt['l']
51
+ Thread.abort_on_exception = false
52
+
51
53
  class ProbeServer
52
- def run(args)
54
+ def initialize
55
+ @jobs = Queue.new
56
+ Thread.new { loop }
57
+ end
58
+
59
+ def run(job)
60
+ @jobs << job
61
+ end
62
+
63
+ private
64
+
65
+ def run_job(job)
53
66
  fork do
54
- exec $0, *args
67
+ exec $0, *job
68
+ end
69
+ Process.wait
70
+ end
71
+
72
+ def loop
73
+ while job = @jobs.pop
74
+ run_job job
55
75
  end
56
76
  end
57
77
  end
78
+
58
79
  puts "Starting probe server listening to #{uri.inspect}."
59
80
  DRb.start_service(uri, ProbeServer.new)
60
81
  begin
data/lib/utils/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.0.63'
3
+ VERSION = '0.0.64'
4
4
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
data/utils.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "utils"
5
- s.version = "0.0.63"
5
+ s.version = "0.0.64"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Florian Frank"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.63
4
+ version: 0.0.64
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -277,7 +277,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
277
277
  version: '0'
278
278
  segments:
279
279
  - 0
280
- hash: 2583930614786779379
280
+ hash: -4422613472465746799
281
281
  required_rubygems_version: !ruby/object:Gem::Requirement
282
282
  none: false
283
283
  requirements: