lib/cloud_crowd/models/work_unit.rb
# Mark this unit as having finished successfully.
# Splitting work units are handled differently (an optimization) -- they 
# immediately fire off all of their resulting WorkUnits for processing, 
# without waiting for the rest of their splitting cousins to complete.
Mark this unit as having finished successfully.
Splitting work units are handled differently (an optimization) -- they
immediately fire off all of their resulting WorkUnits for processing,
without waiting for the rest of their splitting cousins to complete.
Mark this unit as having finished successfully . Splitting work units are handled differently ( an optimization ) -- they immediately fire off all of their resulting WorkUnits for processing without waiting for the rest of their splitting cousins to complete .
def finish(result, time_taken)
      if splitting?
        [JSON.parse(parsed_output(result))].flatten.each do |new_input|
          WorkUnit.start(job, action, new_input, PROCESSING)
        end
        self.destroy
        job.set_next_status if job && job.done_splitting?
      else
        update_attributes({
          :status         => SUCCEEDED,
          :node_record    => nil,
          :worker_pid     => nil,
          :attempts       => attempts + 1,
          :output         => result,
          :time           => time_taken
        })
        job && job.check_for_completion
      end
    end
def finish ( result , time_taken ) if splitting? [ JSON . parse ( parsed_output ( result ) ) ] . flatten . each do | new_input | WorkUnit . start ( job , action , new_input , PROCESSING ) end self . destroy job . set_next_status if job && job . done_splitting? else update_attributes ( { :status => SUCCEEDED , :node_record => nil , :worker_pid => nil , :attempts => attempts + 1 , :output => result , :time => time_taken } ) job && job . check_for_completion end end
Mark this unit as having finished successfully.
Mark this unit as having finished successfully .
result
<not_specific>
time_taken
<not_specific>