def onCommandCreation(self, command): if command.id is None: self.commandMaxId += 1 command.id = self.commandMaxId self.toCreateElements.append(command) else: self.commandMaxId = max(self.commandMaxId, command.id, StatDB.getCommandsMaxId()) self.commands[command.id] = command
def onCommandCreation(self, command): if command.id is None: self.commandMaxId += 1 command.id = self.commandMaxId self.toCreateElements.append(command) else: self.commandMaxId = max(self.commandMaxId, command.id, StatDB.getCommandsMaxId()) self.commands[command.id] = command
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())
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())