server/hooks.py
branchstable
changeset 4496 14cbf2570ce8
parent 4489 63128e8b9af9
child 4514 5bb1d39ea0da
equal deleted inserted replaced
4489:63128e8b9af9 4496:14cbf2570ce8
    56 def _release_unique_cstr_lock(session):
    56 def _release_unique_cstr_lock(session):
    57     global _UNIQUE_CONSTRAINTS_HOLDER
    57     global _UNIQUE_CONSTRAINTS_HOLDER
    58     if _UNIQUE_CONSTRAINTS_HOLDER is session:
    58     if _UNIQUE_CONSTRAINTS_HOLDER is session:
    59         _UNIQUE_CONSTRAINTS_HOLDER = None
    59         _UNIQUE_CONSTRAINTS_HOLDER = None
    60         _UNIQUE_CONSTRAINTS_LOCK.release()
    60         _UNIQUE_CONSTRAINTS_LOCK.release()
    61     else:
       
    62         assert _UNIQUE_CONSTRAINTS_HOLDER is None
       
    63 
    61 
    64 
    62 
    65 def relation_deleted(session, eidfrom, rtype, eidto):
    63 def relation_deleted(session, eidfrom, rtype, eidto):
    66     session.transaction_data.setdefault('pendingrelations', []).append(
    64     session.transaction_data.setdefault('pendingrelations', []).append(
    67         (eidfrom, rtype, eidto))
    65         (eidfrom, rtype, eidto))