Exemple #1
0
    def execute(self):
        postsort_actions = self._generate_actions()

        #sort = topological.sort(self.dependencies, postsort_actions)
        #print "--------------"
        #print self.dependencies
        #print list(sort)
        #print "COUNT OF POSTSORT ACTIONS", len(postsort_actions)

        # execute
        if self.cycles:
            for set_ in topological.sort_as_subsets(self.dependencies,
                                                    postsort_actions):
                while set_:
                    n = set_.pop()
                    n.execute_aggregate(self, set_)
        else:
            for rec in topological.sort(self.dependencies, postsort_actions):
                rec.execute(self)
    def execute(self):
        postsort_actions = self._generate_actions()

        #sort = topological.sort(self.dependencies, postsort_actions)
        #print "--------------"
        #print "\ndependencies:", self.dependencies
        #print "\ncycles:", self.cycles
        #print "\nsort:", list(sort)
        #print "\nCOUNT OF POSTSORT ACTIONS", len(postsort_actions)

        # execute
        if self.cycles:
            for set_ in topological.sort_as_subsets(self.dependencies,
                                                    postsort_actions):
                while set_:
                    n = set_.pop()
                    n.execute_aggregate(self, set_)
        else:
            for rec in topological.sort(self.dependencies, postsort_actions):
                rec.execute(self)