#!/usr/bin/env ruby

require File.dirname(__FILE__) + "/../../config/environment"

JobTask.find(:all, conditions: [ "status = ? and created_at < ?", "finished", 1.day.ago ]).each(&:destroy)

JobTask.update_all("status = 'pending'", "task_type = 'calculate_favorite_tags'")
