memsql/common/sql_lock.py
def ping(self):
        """ Notify the manager that this lock is still active. """
        with self._db_conn() as conn:
            affected_rows = conn.query('''
                UPDATE %s
                SET last_contact=%%s
                WHERE id = %%s AND lock_hash = %%s
            ''' % self._manager.table_name, datetime.utcnow(), self._lock_id, self._lock_hash)

        return bool(affected_rows == 1)
def ping(self):
        """ Notify the manager that this lock is still active. """
        with self._db_conn() as conn:
            affected_rows = conn.query('''
                UPDATE %s
                SET last_contact=%%s
                WHERE id = %%s AND lock_hash = %%s
            ''' % self._manager.table_name, datetime.utcnow(), self._lock_id, self._lock_hash)

        return bool(affected_rows == 1)
Notify the manager that this lock is still active.