Exemple #1
0
    def _reset(self):
        RedisDB.connect()
        MongoDB.connect()

        GiftCodeUsingLog.objects.all().delete()
        # GiftCodeRecord.objects.all().delete()
        # GiftCodeGen.objects.all().delete()
        # GiftCode.objects.all().delete()

        MailHistoryRecord.objects.all().delete()
        Statistics.objects.all().delete()
        Character.objects.all().delete()
        ForbidChat.objects.all().delete()
        AccountBan.objects.all().delete()
        AccountLoginLog.objects.all().delete()
        AccountThird.objects.all().delete()
        AccountRegular.objects.all().delete()
        Account.objects.all().delete()
        GeTuiClientID.objects.all().delete()

        RedisDB.get().flushall()

        for mc in MongoDB.DBS.values():
            mc.client.drop_database(mc.name)

        for s in Server.objects.all():
            ensure_index(s.id)
Exemple #2
0
    def _reset(self):
        RedisDB.connect()
        MongoDB.connect()

        GiftCodeUsingLog.objects.all().delete()
        # GiftCodeRecord.objects.all().delete()
        # GiftCodeGen.objects.all().delete()
        # GiftCode.objects.all().delete()

        MailHistoryRecord.objects.all().delete()
        Statistics.objects.all().delete()
        Character.objects.all().delete()
        ForbidChat.objects.all().delete()
        AccountBan.objects.all().delete()
        AccountLoginLog.objects.all().delete()
        AccountThird.objects.all().delete()
        AccountRegular.objects.all().delete()
        Account.objects.all().delete()
        GeTuiClientID.objects.all().delete()

        RedisDB.get().flushall()

        for mc in MongoDB.DBS.values():
            mc.client.drop_database(mc.name)

        for s in Server.objects.all():
            ensure_index(s.id)
Exemple #3
0
    def __call__(self, request):
        RedisDB.connect()
        MongoDB.connect()

        return self.get_response(request)