def generate_tasks
      tasks = []
      Plan.transaction do
        assignables.each do |a|
          tasks << generate_task_for_assignable(a)
        end
      end

      update_attributes(last_task_created_at: Time.now)

      tasks
    end
def generate_tasks
      tasks = []
      Plan.transaction do
        assignables.each do |a|
          tasks << generate_task_for_assignable(a)
        end
      end

      update_attributes(last_task_created_at: Time.now)

      tasks
    end
生成计划任务

 为每一个计划的执行者创建一个计划任务。