[refs #2161] Fix downloads actions

This commit is contained in:
konstantin.grabar 2011-10-31 20:18:55 +04:00
parent c81289f937
commit fcb9007a47
2 changed files with 3 additions and 2 deletions

View File

@ -8,7 +8,8 @@ class DownloadsController < ApplicationController
def refresh
Download.rotate_nginx_log
Download.send_later :parse_and_remove_nginx_log
#Download.send_later :parse_and_remove_nginx_log
Download.parse_and_remove_nginx_log
redirect_to downloads_path, :notice => t('flash.downloads.statistics_refreshed')
end

View File

@ -27,7 +27,7 @@ class Download < ActiveRecord::Base
def parse_and_remove_nginx_log
parse_nginx_log
system("rm -f #{PREV_LOG_FILE}")
system("sudo rm -f #{PREV_LOG_FILE}")
end
def increase(opts={})