def get_shared_command(self): return cache.get_cache(self.share_code)
def apps(self): if not cache.is_cached(self.cache_key): cache.set_cache(self.cache_key, self.resolve_apps()) return cache.get_cache(self.cache_key)
def cache_cmd(self, args): cache.set_cache(self.get_share_code(args), self.get_cmd(args))
def deployment_events_handler(self): marathon = filter(lambda m: m.contains_ip(self.request.remote_ip), marathons)[0] marathon_apps = map(lambda ma: MarathonApp(marathon, ma), val_from_json(self.evt_data, 'plan.target.apps')) logger.debug("Cache apps info for Marathon: {0}".format(marathon.id)) cache.set_cache(marathon.cache_key, marathon_apps)