aws_info_helper/s3.py
def update_collection(self):
        """Update the rh.Collection object if redis-helper installed"""
        if self._collection is None:
            return

        updates = []
        for bucket in self.get_all_buckets_full_data(cache=True):
            data = ih.cast_keys(bucket, **BUCKET_KEY_VALUE_CASTING)
            data = ih.rename_keys(data, **BUCKET_KEY_NAME_MAPPING)
            data.update(dict(profile=self._profile))
            found = self._collection.find(
                'profile:{}, bucket:{}'.format(self._profile, data['bucket']),
            )
            if not found:
                updates.append(self._collection.add(**data))
        return {'updates': updates}
Update the rh.Collection object if redis-helper installed
Update the rh.Collection object if redis-helper installed
Update the rh . Collection object if redis - helper installed
def update_collection(self):
        if self._collection is None:
            return
        updates = []
        for bucket in self.get_all_buckets_full_data(cache=True):
            data = ih.cast_keys(bucket, **BUCKET_KEY_VALUE_CASTING)
            data = ih.rename_keys(data, **BUCKET_KEY_NAME_MAPPING)
            data.update(dict(profile=self._profile))
            found = self._collection.find(
                'profile:{}, bucket:{}'.format(self._profile, data['bucket']),
            )
            if not found:
                updates.append(self._collection.add(**data))
        return {'updates': updates}
def update_collection ( self ) : if self . _collection is None : return updates = [ ] for bucket in self . get_all_buckets_full_data ( cache = True ) : data = ih . cast_keys ( bucket , ** BUCKET_KEY_VALUE_CASTING ) data = ih . rename_keys ( data , ** BUCKET_KEY_NAME_MAPPING ) data . update ( dict ( profile = self . _profile ) ) found = self . _collection . find ( 'profile:{}, bucket:{}' . format ( self . _profile , data [ 'bucket' ] ) , ) if not found : updates . append ( self . _collection . add ( ** data ) ) return { 'updates' : updates }
Update the rh.Collection object if redis-helper installed
Update the rh . Collection object if redis - helper installed
"""Update the rh.Collection object if redis-helper installed"""
self