def snapshots(self): if app_settings.ENABLE_TASKS: b = get_s3_bucket() keys = b.list(prefix='query-%s/snap-' % self.id) keys_s = sorted(keys, key=lambda k: k.last_modified) return [SnapShot(k.generate_url(expires_in=0, query_auth=False), k.last_modified) for k in keys_s]
def snapshots(self): if app_settings.ENABLE_TASKS: bucket = get_s3_bucket() res = bucket.objects.filter(Prefix='query-%s.snap-' % self.id) return sorted(res, key=lambda s: s['last_modified'])