[refs #2161] Fix downloads actions
This commit is contained in:
parent
c81289f937
commit
fcb9007a47
|
@ -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
|
||||
|
|
|
@ -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={})
|
||||
|
|
Loading…
Reference in New Issue