"id": item["id"],
"status": item["status"]
}
+ cache_item_for_query_str = json.dumps(cache_item_for_query)
if item.get("repeat", 0) == 0:
self.owner.expire(backlog_id)
# keep only the id and status
#update cache
try:
- cache.set(self.owner.cache_expired_prefix + cache_item_for_query["id"], cache_item_for_query, 3600*24)
+ cache.set(self.owner.cache_expired_prefix + cache_item_for_query["id"], cache_item_for_query_str, 3600*24)
cache.delete(self.owner.cache_prefix + cache_item_for_query["id"])
except Exception as e:
logger.error(e.message)
item["timestamp"] = now
#update cache
try:
- cache.set(self.owner.cache_prefix + cache_item_for_query["id"], cache_item_for_query, 3600*24)
+ cache.set(self.owner.cache_prefix + cache_item_for_query["id"], cache_item_for_query_str, 3600*24)
except Exception as e:
logger.error(e.message)
pass
super(APIv1Registry, self).__init__()
# self._logger = logger
+ def get(self, request, cloud_owner="", cloud_region_id=""):
+ self._logger.debug("get cloud region: %s, %s"
+ % (cloud_owner, cloud_region_id))
+
+ vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
+ return super(APIv1Registry, self).get(request, vimid)
+
def post(self, request, cloud_owner="", cloud_region_id=""):
self._logger.info("registration with : %s, %s"
% (cloud_owner, cloud_region_id))