>Ack olabilmeye aday paketleri alabilmek için is_ack metodu – django / noan

>

def is_Ack(self,recursive = 0):
        print “dependencies 1 – “,datetime.datetime.min.now()
        dependencies = self.get_pending_dependencies()
        print “dependencies 2 – “,datetime.datetime.min.now()
        testresult = self.testresult_set.all()
        if not dependencies :
            if testresult.count() == 0:
                if recursive == 0:
                    print “dependencies 3 – “,datetime.datetime.min.now()
                    return True
                else:
                    print “dependencies 3 – “,datetime.datetime.min.now()
                    return None
            else:
                for state in testresult :
                    if state.result == “no”:
                        print “dependencies 3 – “,datetime.datetime.min.now()
                        return False
                print “dependencies 3 – “,datetime.datetime.min.now()
                return True
        for state in testresult:
            if state.result == “no”:
                print “dependencies 3 – “,datetime.datetime.min.now()
                return False
        result = None
        for bin in dependencies:
            if (bin.is_Ack(1) == False ):
                result = False
        print “dependencies 3 – “,datetime.datetime.min.now()
        return result

Bu kodu optimize etmeye çalışıyorum kendisi uzun bir sürede sonuç üretmekte 🙁

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

I'm not a spammer This plugin created by memory cards