Hi, I have a locking system like this
class LockManager: def get_lock(self, id): lock_m=DBSession.query(Locker).with_lockmode("update").\ filter(Locker.id==id).all() if len(lock_m) == 0: lm=Locker(id) DBSession.add(lm) def release_lock(self): transaction.commit() * Issues =======* *1)* I can't use this in nested form, since release of inner transaction will release outer transaction also, since release using transaction.commit() Example: -------- ##Outer lock start LockManager.get_lock("1") //Do something ##Inner lock start LockManager.get_lock("2") //Do something ##Inner lock release(Issue:This will release outer lock also) LockManager.release_lock() ##Outer lock release LockManager.release_lock() *How to solve this issue ???* Thanks, -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.