refactor TaskHeartBeatThread