Skip to content

Commit

Permalink
Refresh TSR cache when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed May 1, 2017
1 parent 89f57f2 commit 456d1b4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
Expand Up @@ -312,7 +312,6 @@ def deactivate_or_uninstall_repository( self, trans, **kwd ):
trans.app.installed_repository_manager.handle_repository_uninstall( tool_shed_repository )
else:
tool_shed_repository.status = trans.install_model.ToolShedRepository.installation_status.DEACTIVATED
trans.install_model.context.add( tool_shed_repository )
trans.install_model.context.flush()
if remove_from_disk_checked:
message += 'The repository named <b>%s</b> has been uninstalled. ' % escape( tool_shed_repository.name )
Expand Down
Expand Up @@ -90,6 +90,7 @@ def reset_all_metadata_on_installed_repository( self ):
self.update_in_shed_tool_config()
self.app.install_model.context.add( self.repository )
self.app.install_model.context.flush()
self.app.tool_shed_repository_cache.rebuild()
log.debug( 'Metadata has been reset on repository %s.' % self.repository.name )
else:
log.debug( 'Metadata did not need to be reset on repository %s.' % self.repository.name )
Expand Down
1 change: 1 addition & 0 deletions lib/tool_shed/util/tool_dependency_util.py
Expand Up @@ -388,4 +388,5 @@ def set_tool_dependency_attributes( app, tool_dependency, status, error_message=
tool_dependency.status = status
sa_session.add( tool_dependency )
sa_session.flush()
app.tool_shed_repository_cache.rebuild()
return tool_dependency

0 comments on commit 456d1b4

Please sign in to comment.