Beispiel #1
0
def cleanup_all_buckets(db, keys):
    for bucket in generate_buckets():
        db['%s%s' % (DatabaseType.BUCKET, bucket)] -= keys
        db['%s%sd' % (DatabaseType.BUCKET, bucket)] = db.get('%s%sd' % (DatabaseType.BUCKET, bucket), set()) - keys
Beispiel #2
0
def merge_all_buckets(db):
    keys = set([keyify(DatabaseType.DIRECTORY, '')])
    for bucket in generate_buckets():
        keys |= db['%s%s' % (DatabaseType.BUCKET, bucket)]
        keys |= db.get('%s%sd' % (DatabaseType.BUCKET, bucket), set())
    return keys