Class: Fairy::Controller::MPNewProcessor
- Inherits:
-
NjobMappingPolicy
- Object
- NjobMappingPolicy
- Fairy::Controller::MPNewProcessor
- Defined in:
- lib/fairy/controller.rb
Overview
必要ない?
class MPSameProcessorObj < NjobMappingPolicy
end
Direct Known Subclasses
Instance Method Summary collapse
- #assign_ntask(&block) ⇒ Object
- #bind_input(njob) ⇒ Object
-
#initialize(mapper) ⇒ MPNewProcessor
constructor
A new instance of MPNewProcessor.
Constructor Details
#initialize(mapper) ⇒ MPNewProcessor
Returns a new instance of MPNewProcessor.
981 982 983 984 985 |
# File 'lib/fairy/controller.rb', line 981 def initialize(mapper) super @export = nil @import = nil end |
Instance Method Details
#assign_ntask(&block) ⇒ Object
987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 |
# File 'lib/fairy/controller.rb', line 987 def assign_ntask(&block) pre_bjob.start_export(input_filter) pre_bjob.each_export_by(input_filter, self) do |export, opts={}| # pre_bjob.each_export_by(input_filter, self) do |export, opts| # opts = {} unless opts # thread を立ち上げるべき # このままでは, 十分に並列性が取れない(for [REQ:#5)] controller.assign_new_processor(target_bjob) do |processor| # シリアライズに処理されることが前提になっている @export = export @import = target_bjob.create_import(processor) ntask = processor.create_ntask block.call(ntask, @mapper, opts) end end end |
#bind_input(njob) ⇒ Object
1006 1007 1008 1009 1010 1011 1012 |
# File 'lib/fairy/controller.rb', line 1006 def bind_input(njob) @import.no = @export.no @import.key = @export.key njob.input = @import @export.output = @import pre_bjob.bind_export(@export, @import) end |