lib/resque/plugins/multi_step_task.rb
def create(slug=nil)
          task_id = if slug.nil? || slug.empty?
                      "multi-step-task"
                    else
                      slug.to_s
                    end
          task_id << "~" << nonce

          mst = new(task_id)
          mst.nuke
          redis.sadd("active-tasks", task_id)
          if block_given?
            yield mst
            mst.finalizable!
          end

          mst
        end
# Create a brand new multi-step-task.
#
# @param [#to_s] slug The descriptive slug of the new job.  Default: a
#   random UUID
#
# @yield [multi_step_task] A block to define the work to take place in parallel
#
# @yieldparam [MultiStepTask] The newly create job group.
#
# @return [MultiStepTask] The new job group
Create a brand new multi-step-task.
Create a brand new multi - step - task .
def create(slug=nil)
          task_id = if slug.nil? || slug.empty?
                      "multi-step-task"
                    else
                      slug.to_s
                    end
          task_id << "~" << nonce
          mst = new(task_id)
          mst.nuke
          redis.sadd("active-tasks", task_id)
          if block_given?
            yield mst
            mst.finalizable!
          end
          mst
        end
def create ( slug = nil ) task_id = if slug . nil? || slug . empty? "multi-step-task" else slug . to_s end task_id << "~" << nonce mst = new ( task_id ) mst . nuke redis . sadd ( "active-tasks" , task_id ) if block_given? yield mst mst . finalizable! end mst end
Create a brand new multi-step-task.
Create a brand new multi - step - task .
The new job group
The new job group
MultiStepTask
slug
The newly create job group.
The newly create job group .
]
A block to define the work to take place in parallel
A block to define the work to take place in parallel