commit/galaxy-central: dannon: Force odict usage (sorted by 'order' key in object_store_config) for HierarchicalObjectStore
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/829c047e0577/ Changeset: 829c047e0577 User: dannon Date: 2013-10-11 16:56:57 Summary: Force odict usage (sorted by 'order' key in object_store_config) for HierarchicalObjectStore Affected #: 1 file diff -r 750e687b468a27978d51dfac9d542a0cc113e64b -r 829c047e05776fb2a6568f0d1076856fe6255fab lib/galaxy/objectstore/__init__.py --- a/lib/galaxy/objectstore/__init__.py +++ b/lib/galaxy/objectstore/__init__.py @@ -14,6 +14,7 @@ from galaxy.jobs import Sleeper from galaxy.model import directory_hash_id from galaxy.exceptions import ObjectNotFound, ObjectInvalid +from galaxy.util.odict import odict from sqlalchemy.orm import object_session @@ -568,10 +569,10 @@ def __init__(self, config, config_xml=None, fsmon=False): super(HierarchicalObjectStore, self).__init__(config, config_xml=config_xml) - for b in config_xml.find('backends'): + self.backends = odict() + for b in sorted(config_xml.find('backends'), key=lambda b: int(b.get('order'))): self.backends[int(b.get('order'))] = build_object_store_from_config(config, fsmon=fsmon, config_xml=b) - def exists(self, obj, **kwargs): """ Exists must check all child object stores Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org