Author: tmckay Date: 2011-08-15 14:54:37 +0000 (Mon, 15 Aug 2011) New Revision: 4924
Modified: trunk/sage/python/sage/wallaby/wallabyoperations.py Log: Test for null broker in wallaby operations, don't start the caching thread if the broker is null.
Modified: trunk/sage/python/sage/wallaby/wallabyoperations.py =================================================================== --- trunk/sage/python/sage/wallaby/wallabyoperations.py 2011-08-12 19:56:19 UTC (rev 4923) +++ trunk/sage/python/sage/wallaby/wallabyoperations.py 2011-08-15 14:54:37 UTC (rev 4924) @@ -229,12 +229,14 @@
self._stop = False
-# self._maintain_cache = CallThread(cProfile.runctx('maintain_cache(self)', globals(), locals(), filename='sage.stats'), None) - self._maintain_cache = CallThread(maintain_cache, None, self) - self._maintain_cache.daemon = True - self._maintain_cache.start() - log.debug("WallabyOperations: start cache maintenance thread") - return True + if self.broker_uri is not None: +# self._maintain_cache = CallThread(cProfile.runctx('maintain_cache(self)', globals(), locals(), filename='sage.stats'), None) + self._maintain_cache = CallThread(maintain_cache, None, self) + self._maintain_cache.daemon = True + self._maintain_cache.start() + log.debug("WallabyOperations: start cache maintenance thread") + return True + return False
def stop(self, wait=False, timeout=None): ''' @@ -577,11 +579,29 @@ def get_names(self, *args, **kwargs): return []
+ def get_node_by_name(self, *args, **kwargs): + return None + + def get_group_by_name(self, *args, **kwargs): + return None + + def get_tag_by_name(self, *args, **kwargs): + return None + def get_node_names(self, *args, **kwargs): return []
def get_tag_names(self, *args, **kwargs): return []
+ def create_tag(self, *args, **kwargs): + return False + + def remove_tag(self, *args, **kwargs): + return False + + def edit_tags(self, *args, **kwargs): + return False + def set_interval(self, *args, **kwargs): pass
cumin-developers@lists.fedorahosted.org