a.useCache = True o3 = a.GetObjs() cc += len(o3) print time.time() - t2, "Loading after Close", cc, "objects" t2 = time.time() user = User(u"test") for id in ids: r.Delete(id, user=user) #try: # r.Delete(id) #except Exception, e: # raise Exception, str(ids)+ " " + str(id) print time.time() - t2, "Deleting objects recursively" print "------------" print time.time() - t, "Total. Finished (contains", db_app.statdb( a), "Entries)" a.Close() print "--------------------------------------------------------" if __name__ == '__main__': db_app.emptypool(db_app.app_db()) test1() test2() test3() test4() test5() db_app.emptypool(db_app.app_db())
a.useCache = True o3 = a.GetObjs() cc+=len(o3) print time.time() - t2, "Loading after Close", cc, "objects" t2 = time.time() user = User(u"test") for id in ids: r.Delete(id, user=user) #try: # r.Delete(id) #except Exception, e: # raise Exception, str(ids)+ " " + str(id) print time.time() - t2, "Deleting objects recursively" print "------------" print time.time() - t, "Total. Finished (contains", db_app.statdb(a), "Entries)" a.Close() print "--------------------------------------------------------" if __name__ == '__main__': db_app.emptypool(db_app.app_db([DB_CONF])) test1() test2() test3() test4() test5() db_app.emptypool(db_app.app_db([DB_CONF]))
a.useCache = True o3 = a.GetObjs() cc+=len(o3) print time.time() - t2, "Loading after Close", cc, "objects" t2 = time.time() user = User(u"test") for id in ids: r.Delete(id, user=user) #try: # r.Delete(id) #except Exception, e: # raise Exception, str(ids)+ " " + str(id) print time.time() - t2, "Deleting objects recursively" print "------------" print time.time() - t, "Total. Finished (contains", db_app.statdb(a), "Entries)" a.Close() print "--------------------------------------------------------" if __name__ == '__main__': db_app.emptypool(db_app.app_db()) test1() test2() test3() test4() test5() db_app.emptypool(db_app.app_db())
a.useCache = True o3 = a.GetObjs() cc += len(o3) print time.time() - t2, "Loading after Close", cc, "objects" t2 = time.time() user = User(u"test") for id in ids: r.Delete(id, user=user) #try: # r.Delete(id) #except Exception, e: # raise Exception, str(ids)+ " " + str(id) print time.time() - t2, "Deleting objects recursively" print "------------" print time.time() - t, "Total. Finished (contains", db_app.statdb( a), "Entries)" a.Close() print "--------------------------------------------------------" if __name__ == '__main__': db_app.emptypool(db_app.app_db([DB_CONF])) test1() test2() test3() test4() test5() db_app.emptypool(db_app.app_db([DB_CONF]))