lib/ripe/worker_controller/preparer.rb
def load_workflow(workflow, params)
        filename = Library.find(:workflow, "#{workflow}.rb")
        abort "Could not find workflow #{workflow}." if filename == nil
        require_relative filename

        # Imports +$workflow+ from the workflow component.  This is a dirty
        # hack to help make the +DSL::WorkflowDSL+ more convenient for the
        # end user.

        params = {
          wd:        Dir.pwd,
          mode:      :patch,
          group_num: 1,
        }.merge($workflow.params.merge(params))

        [$workflow.callback, params]
      end
##
# Load a workflow and return its +callback+ and +params+ components.
#
# @param workflow [String] the name of a workflow
# @param params [Hash<Symbol, String>] a list of worker-wide parameters
# @return [Proc, Hash<Symbol, String>] a list containing the workflow callback
#   and default params
Load a workflow and return its +callback+ and +params+ components.
Load a workflow and return its + callback + and + params + components .
def load_workflow(workflow, params)
        filename = Library.find(:workflow, "#{workflow}.rb")
        abort "Could not find workflow #{workflow}." if filename == nil
        require_relative filename
        params = {
          wd:        Dir.pwd,
          mode:      :patch,
          group_num: 1,
        }.merge($workflow.params.merge(params))
        [$workflow.callback, params]
      end
def load_workflow ( workflow , params ) filename = Library . find ( :workflow , "#{workflow}.rb" ) abort "Could not find workflow #{workflow}." if filename == nil require_relative filename params = { wd : Dir . pwd , mode : :patch , group_num : 1 , } . merge ( $workflow . params . merge ( params ) ) [ $workflow . callback , params ] end
Load a workflow and return its +callback+ and +params+ components.
Load a workflow and return its + callback + and + params + components .
# Imports +$workflow+ from the workflow component.  This is a dirty # hack to help make the +DSL::WorkflowDSL+ more convenient for the # end user.
a list containing the workflow callback and default params
a list containing the workflow callback and default params
Proc, Hash<Symbol, String>
workflow
the name of a workflow
the name of a workflow
params
a list of worker-wide parameters
a list of worker - wide parameters