socialforge/lib/tasks/project_score.rake

17 lines
437 B
Ruby

# -*coding:utf-8 -*-
desc "project score Initialize"
task :project_score do
puts "project_score sync."
end
namespace :project_score do
desc "calculating first page"
task :calculate => :environment do
include ProjectScoreHelper
Project.where("project_type != 1").all.each do |project|
result = project_scores(project)
puts "score of #{project.name} is #{result}"
end
puts "calculate completed"
end
end