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)
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)