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