1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Compare commits

...

4 Commits

Author SHA1 Message Date
krateng
62abc31930 Version bump 2022-04-25 03:37:12 +02:00
krateng
c55e12dd43 Re-enabled cache per default 2022-04-25 03:24:16 +02:00
krateng
95f98370cf Updated branch notes 2022-04-25 02:47:03 +02:00
krateng
e470e2e43f Potentially fixed nonsensical caching, GH-132 2022-04-25 02:42:07 +02:00
7 changed files with 14 additions and 5 deletions

View File

@ -42,3 +42,9 @@ minor_release_name: "Yeonhee"
- "[Bugfix] Fixed importing a Spotify file without path"
- "[Bugfix] No longer releasing database lock during scrobble creation"
- "[Distribution] Experimental arm64 image"
3.0.7:
notes:
- "[Bugix] Improved signal handling"
- "[Bugix] Fixed constant re-caching of all-time stats, significantly increasing page load speed"
- "[Logging] Disabled cache information when cache is not used"
- "[Distribution] Experimental arm/v7 image"

1
dev/releases/branch.yml Normal file
View File

@ -0,0 +1 @@

View File

@ -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.6"
VERSION = "3.0.7"
HOMEPAGE = "https://github.com/krateng/maloja"

View File

@ -23,7 +23,8 @@ class JinjaDBConnection:
return self
def __exit__(self, exc_type, exc_value, exc_traceback):
self.conn.close()
log(f"Generated page with {self.hits}/{self.hits+self.misses} local Cache hits",module="debug_performance")
if malojaconfig['USE_REQUEST_CACHE']:
log(f"Generated page with {self.hits}/{self.hits+self.misses} local Cache hits",module="debug_performance")
del self.cache
def __getattr__(self,name):
originalmethod = getattr(database,name)

View File

@ -150,7 +150,7 @@ malojaconfig = Configuration(
"cache_expire_negative":(tp.Integer(), "Image Cache Negative Expiration", 5, "Days until failed image fetches are reattempted"),
"db_max_memory":(tp.Integer(min=0,max=100), "RAM Percentage soft limit", 80, "RAM Usage in percent at which Maloja should no longer increase its database cache."),
"use_request_cache":(tp.Boolean(), "Use request-local DB Cache", False),
"use_global_cache":(tp.Boolean(), "Use global DB Cache", False)
"use_global_cache":(tp.Boolean(), "Use global DB Cache", True)
},
"Fluff":{
"scrobbles_gold":(tp.Integer(), "Scrobbles for Gold", 250, "How many scrobbles a track needs to be considered 'Gold' status"),

View File

@ -320,7 +320,8 @@ class MTRangeComposite(MTRangeGeneric):
if self.since is None: return FIRST_SCROBBLE
else: return self.since.first_stamp()
def last_stamp(self):
if self.to is None: return int(datetime.utcnow().replace(tzinfo=timezone.utc).timestamp())
#if self.to is None: return int(datetime.utcnow().replace(tzinfo=timezone.utc).timestamp())
if self.to is None: return today().last_stamp()
else: return self.to.last_stamp()
def next(self,step=1):

View File

@ -1,6 +1,6 @@
[project]
name = "malojaserver"
version = "3.0.6"
version = "3.0.7"
description = "Self-hosted music scrobble database"
readme = "./README.md"
requires-python = ">=3.6"