mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Replaced cache trimming with full clear for now
This commit is contained in:
parent
b8aa2a562e
commit
cabfa298b9
@ -4,7 +4,7 @@
|
||||
# you know what f*ck it
|
||||
# this is hardcoded for now because of that damn project / package name discrepancy
|
||||
# i'll fix it one day
|
||||
VERSION = "3.0.0-beta.5"
|
||||
VERSION = "3.0.0-beta.6"
|
||||
HOMEPAGE = "https://github.com/krateng/maloja"
|
||||
|
||||
|
||||
|
@ -114,9 +114,10 @@ def trim_cache():
|
||||
log(f"{ramprct}% RAM usage, reducing caches!")
|
||||
ratio = 0.6
|
||||
targetsize = max(int(len(cache) * ratio),50)
|
||||
log(f"Reducing to {targetsize} entries")
|
||||
cache.set_size(targetsize)
|
||||
cache.set_size(HIGH_NUMBER)
|
||||
#log(f"Reducing to {targetsize} entries")
|
||||
#cache.set_size(targetsize)
|
||||
#cache.set_size(HIGH_NUMBER)
|
||||
cache.clear()
|
||||
#log(f"New RAM usage: {psutil.virtual_memory().percent}%")
|
||||
print_stats()
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "malojaserver"
|
||||
version = "3.0.0-beta.5"
|
||||
version = "3.0.0-beta.6"
|
||||
description = "Self-hosted music scrobble database"
|
||||
readme = "./README.md"
|
||||
requires-python = ">=3.6"
|
||||
|
Loading…
Reference in New Issue
Block a user