James Taylor wrote:
I don't think we can add this in its current form since it enables a denial of service. It would seem to make more sense to have this provided in the admin interface. Also, this refreshes the entire toolbox which I imagine is pretty slow? One idea might be to do a hash of the tool config contents when initially loading (or use mtime) and only reload new tools or changed tools.
It also doesn't handle the case of multiple processes, which is why I wanted to also implement it through a HUP signal. Although if the functionality is there, making it happen on HUP should be pretty simple. --nate
Excerpts from chaitanya guttula's message of Fri Dec 03 17:04:13 +0000 2010:
Hi Chaolin,
I am Chaitanya Guttula from University of Goergia, working under Dr. Jessica Kissinger and Dr. John Miller . Sumedha, a previous student in this lab developed the code to refresh galaxy without restarting it again. The galaxy developers community also agreed to add the functionality to the galaxy main code base. It requires minimal change to the galaxy-code base. These are the instructions to do that.
Changes to Galaxy to add refresh toolbox ability: 1. change the execute method of the class tool in lib/galaxy/tools/__init__.py to
def execute( self, trans, incoming={}, set_output_hid=True ): """ Execute the tool using parameter values in `incoming`. This just dispatches to the `ToolAction` instance specified by `self.tool_action`. In general this will create a `Job` that when run will build the tool's outputs, e.g. `DefaultToolAction`. """
############# #add code to verify if user has administrative privileges #added by sumedha ganjoo, sganjoo@uga.edu: line 1104 to 1109 - to refresh toolbox if self.id == 'REFRESH_ID': self.app.refreshToolBox() #############
return self.tool_action.execute( self, trans, incoming=incoming, set_output_hid=set_output_hid )
2. add refreshToolBox method (find below) to UniverseApplication class in lib/galaxy/app.py
########### # added by sumedha ganjoo,sganjoo@uga.edu, line 86-90 def refreshToolBox( self): self.toolbox = tools.ToolBox( self.config.tool_config, self.config.tool_path, self ) ###########
3. Add Refresh tool
Thanks, Chaitanya Guttula.
On Thu, Dec 2, 2010 at 9:14 PM, Chaolin Zhang <zhangchaolin@gmail.com>wrote:
Hi, We have a local galaxy mirror installed and running. Is there a way to add new tools without restarting galaxy? Thanks!
Chaolin _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev