memsql/common/sql_lock.py
def release(self):
        """ Release the lock. """
        if self.valid():
            with self._db_conn() as conn:
                affected_rows = conn.query('''
                    DELETE FROM %s
                    WHERE id = %%s AND lock_hash = %%s
                ''' % self._manager.table_name, self._lock_id, self._lock_hash)
            return bool(affected_rows == 1)
        else:
            return False
def release(self):
        """ Release the lock. """
        if self.valid():
            with self._db_conn() as conn:
                affected_rows = conn.query('''
                    DELETE FROM %s
                    WHERE id = %%s AND lock_hash = %%s
                ''' % self._manager.table_name, self._lock_id, self._lock_hash)
            return bool(affected_rows == 1)
        else:
            return False
def release ( self ) : if self . valid ( ) : with self . _db_conn ( ) as conn : affected_rows = conn . query ( '''
                    DELETE FROM %s
                    WHERE id = %%s AND lock_hash = %%s
                ''' % self . _manager . table_name , self . _lock_id , self . _lock_hash ) return bool ( affected_rows == 1 ) else : return False
Release the lock.
Release the lock .