noda 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/noda/job_worker.rb +17 -3
  3. data/noda.gemspec +1 -1
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.12
1
+ 0.0.13
@@ -8,9 +8,23 @@ module Noda
8
8
  # w=Noda::JobWorker.new("#{ip}", "10001")
9
9
  # t = DRb.start_service("druby://#{ip}:10101",w)
10
10
  # w.start
11
- #
11
+ # Taskをサーバー経由で送信する
12
+ # ip=127.0.0.1
13
+ # server = Noda::JobServer.new ip,"10001"
14
+ # str = %Q'
15
+ # class Noda::MyTask
16
+ # def do_task(table)
17
+ # table.put @name, "#{Process.pid} : #{Time.now}"
18
+ # return "#{@name} in #{Process.pid} : #{Time.now}"
19
+ # end
20
+ # def initialize(name) @name end
21
+ # end
22
+ # '
23
+ # eval(str)
24
+ # task = Noda::MyTask.new("test")
25
+ # server.add_task_class( task.class.to_s, str)
26
+ # 10.times{|i| server.input.push Noda::MyTask.new(i) }
12
27
  #
13
-
14
28
  class JobWorker
15
29
  attr_reader :thread
16
30
  attr_accessor :max_retry_connect , :wait_time_to_retry
@@ -59,7 +73,7 @@ class JobWorker
59
73
  # *name クラス名
60
74
  def load_class(name)
61
75
  s = @job.task_class(name)
62
- Noda.module_eval(s)
76
+ Noda.module_eval(s) if s
63
77
  end
64
78
  # ワーカーのメインスレッドを起動します.start で使います.
65
79
  def init_thread
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{noda}
8
- s.version = "0.0.12"
8
+ s.version = "0.0.13"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["takuya"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noda
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 12
10
- version: 0.0.12
9
+ - 13
10
+ version: 0.0.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - takuya