bsherin / tactic

5 stars 1 forks source link

Make container/docker monitor/health tracker #1188

Open bsherin opened 4 months ago

bsherin commented 4 months ago

It looks like I just run check_health from various places in the main host loop.

# in qworker
def do_heartbeat(self):
    if self.generate_heartbeats:
        current_time = current_timestamp()
        if (current_time - self.last_heartbeat) > heartbeat_time:
            self.post_task("host", "container_heartbeat", {"container_id": self.my_id})
            self.last_heartbeat = current_time
    return