Skip to content

Commit

Permalink
Adding STATS_REFRESH_SECONDS
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtlmoon committed Feb 9, 2024
1 parent 74e5d1b commit 50a7c7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
connection_count_total = 0
shutdown = False
memory_use_limit_percent = int(os.getenv('HARD_MEMORY_USAGE_LIMIT_PERCENT', 90))

stats_refresh_time = int(os.getenv('STATS_REFRESH_SECONDS', 10))

# @todo Some UI where you can change loglevel on a UI?
# @todo Some way to change connection threshold via UI
Expand Down Expand Up @@ -301,7 +301,7 @@ async def stats_thread_func():
svmem = psutil.virtual_memory()
logger.info(f"Memory: Used {svmem.percent}% (Limit {memory_use_limit_percent}%) - Available {svmem.free / 1024 / 1024:.1f}MB ")

await asyncio.sleep(20)
await asyncio.sleep(stats_refresh_time)


if __name__ == '__main__':
Expand Down

0 comments on commit 50a7c7a

Please sign in to comment.