

def BeatOnce(dbh, interval):
    sql = ('\n    UPDATE Heartbeat\n    SET LastHeartbeat = UNIX_TIMESTAMP()\n     WHERE LastHeartbeat <= UNIX_TIMESTAMP() - %f\n    ' % (interval - 1.0))
    dbh.ExecuteOrDie(sql)

dataset/ETHPy150Open google/mysql-tools/replication_heartbeat.py BeatOnce/original