Mercurial > hg > soundsoftware-site
diff app/controllers/sys_controller.rb @ 437:102056ec2de9 bug_169
Introduce a method on the sys controller to clear a repository cache; use a file in the mirror dir to notify the Ruby external repo script that it needs to call it
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Mon, 06 Jun 2011 13:31:44 +0100 |
parents | 6c282df74a30 |
children | 5e80956cc792 |
line wrap: on
line diff
--- a/app/controllers/sys_controller.rb Mon Jun 06 12:53:06 2011 +0100 +++ b/app/controllers/sys_controller.rb Mon Jun 06 13:31:44 2011 +0100 @@ -69,6 +69,16 @@ render :nothing => true, :status => 404 end + def clear_repository_cache + project = Project.find(params[:id]) + if project.repository + project.repository.clear_cache + end + render :nothing => true, :status => 200 + rescue ActiveRecord::RecordNotFound + render :nothing => true, :status => 404 + end + def set_embedded_active project = Project.find(params[:id]) mods = project.enabled_modules