Esempio n. 1
0
 def get_shared_command(self):
     return cache.get_cache(self.share_code)
Esempio n. 2
0
    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)
Esempio n. 3
0
 def cache_cmd(self, args):
     cache.set_cache(self.get_share_code(args), self.get_cmd(args))
Esempio n. 4
0
 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)