mirror of
https://github.com/masterking32/MasterHttpRelayVPN.git
synced 2026-05-17 21:24:37 +03:00
feat: enhance execution logger to report usage only on count change
This commit is contained in:
@@ -264,11 +264,14 @@ class DomainFronter:
|
||||
self._exec_total += count
|
||||
|
||||
async def _execution_logger(self):
|
||||
"""Log execution usage every N seconds."""
|
||||
"""Log execution usage every N seconds, only when the count changed."""
|
||||
interval = self._execution_report_interval
|
||||
last_reported = -1
|
||||
while True:
|
||||
try:
|
||||
await asyncio.sleep(interval)
|
||||
if self._exec_total != last_reported:
|
||||
last_reported = self._exec_total
|
||||
log.info("Apps Script executions used so far: %d", self._exec_total)
|
||||
except asyncio.CancelledError:
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user