Ejemplo n.º 1
0
 def onNodeCreation(self, node):
     # logger.info("  -- on node creation: %s" % node)
     if node.id is None:
         self.nodeMaxId += 1
         node.id = self.nodeMaxId
         self.toCreateElements.append(node)
     else:
         self.nodeMaxId = max(self.nodeMaxId, node.id,
                              StatDB.getFolderNodesMaxId(),
                              StatDB.getTaskNodesMaxId())
     if node.parent is None:
         node.parent = self.root
Ejemplo n.º 2
0
 def recomputeMaxIds(self):
     self.nodeMaxId = max([n.id for n in self.nodes.values()]) if self.nodes else 0
     self.nodeMaxId = max(self.nodeMaxId, StatDB.getFolderNodesMaxId(), StatDB.getTaskNodesMaxId())
     self.poolMaxId = max([p.id for p in self.pools.values()]) if self.pools else 0
     self.poolMaxId = max(self.poolMaxId, StatDB.getPoolsMaxId())
     self.renderNodeMaxId = max([rn.id for rn in self.renderNodes.values()]) if self.renderNodes else 0
     self.renderNodeMaxId = max(self.renderNodeMaxId, StatDB.getRenderNodesMaxId())
     self.taskMaxId = max([t.id for t in self.tasks.values()]) if self.tasks else 0
     self.taskMaxId = max(self.taskMaxId, StatDB.getTasksMaxId(), StatDB.getTaskGroupsMaxId())
     self.commandMaxId = max([c.id for c in self.commands.values()]) if self.commands else 0
     self.commandMaxId = max(self.commandMaxId, StatDB.getCommandsMaxId())
     self.poolShareMaxId = max([ps.id for ps in self.poolShares.values()]) if self.poolShares else 0
     self.poolShareMaxId = max(self.poolShareMaxId, StatDB.getPoolSharesMaxId())
Ejemplo n.º 3
0
 def recomputeMaxIds(self):
     self.nodeMaxId = max([n.id for n in self.nodes.values()
                           ]) if self.nodes else 0
     self.nodeMaxId = max(self.nodeMaxId, StatDB.getFolderNodesMaxId(),
                          StatDB.getTaskNodesMaxId())
     self.poolMaxId = max([p.id for p in self.pools.values()
                           ]) if self.pools else 0
     self.poolMaxId = max(self.poolMaxId, StatDB.getPoolsMaxId())
     self.renderNodeMaxId = max([rn.id for rn in self.renderNodes.values()
                                 ]) if self.renderNodes else 0
     self.renderNodeMaxId = max(self.renderNodeMaxId,
                                StatDB.getRenderNodesMaxId())
     self.taskMaxId = max([t.id for t in self.tasks.values()
                           ]) if self.tasks else 0
     self.taskMaxId = max(self.taskMaxId, StatDB.getTasksMaxId(),
                          StatDB.getTaskGroupsMaxId())
     self.commandMaxId = max([c.id for c in self.commands.values()
                              ]) if self.commands else 0
     self.commandMaxId = max(self.commandMaxId, StatDB.getCommandsMaxId())
     self.poolShareMaxId = max([ps.id for ps in self.poolShares.values()
                                ]) if self.poolShares else 0
     self.poolShareMaxId = max(self.poolShareMaxId,
                               StatDB.getPoolSharesMaxId())
Ejemplo n.º 4
0
 def onNodeCreation(self, node):
     # logger.info("  -- on node creation: %s" % node)
     if node.id is None:
         self.nodeMaxId += 1
         node.id = self.nodeMaxId
         self.toCreateElements.append(node)
     else:
         self.nodeMaxId = max(self.nodeMaxId, node.id, StatDB.getFolderNodesMaxId(), StatDB.getTaskNodesMaxId())
     if node.parent is None:
         node.parent = self.root