From: Alan Date: Tue, 16 Apr 2024 02:33:27 +0000 (+0800) Subject: reduce frequency of heatbeat X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=29a31647d9d95c567c0ce69e0ee085ea0bd4dbfe reduce frequency of heatbeat --- diff --git a/Heartbeat.php b/Heartbeat.php index 27c1bf87..b95c3be9 100644 --- a/Heartbeat.php +++ b/Heartbeat.php @@ -38,6 +38,10 @@ class Pman_Core_Heartbeat extends Pman } $cd->find(true); $cc = clone($cd); + if ( (time() - strtotime($cc->display_name)) < 30) { + die("OK - HEATBEAT TO FREQUENT"); + } + $cd->display_name = date("Y-m-d H:i:s"); $cd->update($cc); die("OK - HEARTBEAT WORKING");