예제 #1
0
def clean_buckets():
    if "test" not in settings.COUCHBASE_BUCKET:
        raise Exception("will not clean non-test bucket")

    all_docs = SyncGateway.all_docs([], really_all=True)

    for i in all_docs["rows"]:
        uid = i["id"]
        rev = i["value"]["rev"]
        if "sync" in uid:
            continue
        # print 'del %s' % uid
        SyncGateway.delete_document(uid, rev)
예제 #2
0
def clean_buckets():
    if 'test' not in settings.COUCHBASE_BUCKET:
        raise Exception('will not clean non-test bucket')

    all_docs = SyncGateway.all_docs([], really_all=True)

    for i in all_docs['rows']:
        uid = i['id']
        rev = i['value']['rev']
        if 'sync' in uid:
            continue
        # print 'del %s' % uid
        SyncGateway.delete_document(uid, rev)