Methods
Attributes
[RW] debug_logger
Public Instance methods
connection_completed()
     # File server/master_worker.rb, line 122
122:     def connection_completed; end
delete_drb_worker(t_data)
    # File server/master_worker.rb, line 50
50:     def delete_drb_worker(t_data)
51:       worker_name = t_data[:worker]
52:       job_key = t_data[:job_key]
53:       worker_name_key = gen_worker_key(worker_name,job_key)
54:       begin
55:         ask_worker(worker_name,:job_key => t_data[:job_key],:type => :request, :data => { :worker_method => :exit})
56:       rescue Packet::DisconnectError => sock_error
57:         # reactor.live_workers.delete(worker_name_key)
58:         reactor.remove_worker(sock_error)
59:       rescue
60:         debug_logger.info($!.to_s)
61:         debug_logger.info($!.backtrace.join("\n"))
62:         return
63:       end
64:     end
post_init()
     # File server/master_worker.rb, line 119
119:     def post_init
120:       @tokenizer = BinParser.new
121:     end
process_request(t_data)
     # File server/master_worker.rb, line 95
 95:     def process_request(t_data)
 96:       worker_name = t_data[:worker]
 97:       worker_name_key = gen_worker_key(worker_name,t_data[:job_key])
 98:       t_data.delete(:worker)
 99:       t_data.delete(:type)
100:       begin
101:         ask_worker(worker_name_key,:data => t_data, :type => :request)
102:       rescue Packet::DisconnectError => sock_error
103:         reactor.live_workers.delete(worker_name_key)
104:       rescue
105:         debug_logger.info($!.to_s)
106:         debug_logger.info($!.backtrace.join("\n"))
107:         return
108:       end
109:     end
process_status(t_data)
    # File server/master_worker.rb, line 87
87:     def process_status(t_data)
88:       worker_name = t_data[:worker]
89:       job_key = t_data[:job_key]
90:       worker_name_key = gen_worker_key(worker_name,job_key)
91:       status_data = reactor.result_hash[worker_name_key.to_sym]
92:       send_object(status_data)
93:     end
process_work(t_data)
    # File server/master_worker.rb, line 70
70:     def process_work(t_data)
71:       worker_name = t_data[:worker]
72:       worker_name_key = gen_worker_key(worker_name,t_data[:job_key])
73:       t_data.delete(:worker)
74:       t_data.delete(:type)
75:       begin
76:         ask_worker(worker_name_key,:data => t_data, :type => :request)
77:       rescue Packet::DisconnectError => sock_error
78:         reactor.live_workers.delete(worker_name_key)
79:       rescue
80:         debug_logger.info($!.to_s)
81:         debug_logger.info($!.backtrace.join("\n"))
82:         return
83:       end
84: 
85:     end
query_all_worker_status(p_data)
    # File server/master_worker.rb, line 44
44:     def query_all_worker_status(p_data)
45:       dumpable_status = { }
46:       reactor.live_workers.each { |key,value| dumpable_status[key] = value.worker_status }
47:       send_object(dumpable_status)
48:     end
receive_data(p_data)
    # File server/master_worker.rb, line 28
28:     def receive_data p_data
29:       debug_logger.info(p_data)
30:       @tokenizer.extract(p_data) do |b_data|
31:         t_data = Marshal.load(b_data)
32:         debug_logger.info(t_data)
33:         case t_data[:type]
34:         when :do_work: process_work(t_data)
35:         when :get_status: process_status(t_data)
36:         when :get_result: process_request(t_data)
37:         when :start_worker: start_worker_request(t_data)
38:         when :delete_worker: delete_drb_worker(t_data)
39:         when :all_worker_status: query_all_worker_status(t_data)
40:         end
41:       end
42:     end
start_worker_request(p_data)
    # File server/master_worker.rb, line 66
66:     def start_worker_request(p_data)
67:       start_worker(p_data)
68:     end
unbind()
     # File server/master_worker.rb, line 116
116:     def unbind
117:       debug_logger.info("Client disconected")
118:     end
worker_receive(p_data)

this method can receive one shot status reports or proper results

     # File server/master_worker.rb, line 112
112:     def worker_receive p_data
113:       send_object(p_data)
114:     end