Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
DBWorkflow's index gets out of sync #1137
I have no idea why any of this is there of how it work. It seems to me that the DB layer was meant to be an easy-to-use, efficient object storage, but it is nothing like that .
The problem this time is that Pipeline#clear() does not clear the DBWorkflow's "index" thing, the
: The piece of code for deleting a module loops until it finds it!
def db_delete_module(self, module): self.is_dirty = True for i in xrange(len(self._db_modules)): if self._db_modules[i].db_id == module.db_id: ...
Yes, the db code would benefit from revision. The original goal was to provide serialization to XML and RDBMS (and potentially other formats). In order to preserve legacy access, various indexes were added but order was also mattered for some features where only that was used and ids didn't originally exist. Basically, we wanted to add the db code without changing the logic at the core level. This, and my beginning Python knowledge at the time, caused code like the ugly list/dictionary code above.