mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-25 14:37:59 +01:00
Fix high memory usage from eager caching
This commit is contained in:
parent
10d906bf7c
commit
df90cd5afa
1 changed files with 3 additions and 2 deletions
|
@ -149,7 +149,7 @@ class ApiClient:
|
||||||
Args:
|
Args:
|
||||||
token: Fimfiction authorization bearer.
|
token: Fimfiction authorization bearer.
|
||||||
"""
|
"""
|
||||||
self.session = self.create_session(token)
|
self.token = token
|
||||||
|
|
||||||
def create_session(self, token: str) -> Session:
|
def create_session(self, token: str) -> Session:
|
||||||
"""
|
"""
|
||||||
|
@ -201,8 +201,9 @@ class ApiClient:
|
||||||
A jsonapi response document.
|
A jsonapi response document.
|
||||||
"""
|
"""
|
||||||
query = self.create_filter(params)
|
query = self.create_filter(params)
|
||||||
|
session = self.create_session(self.token)
|
||||||
|
|
||||||
return self.session.get(path, query)
|
return session.get(path, query)
|
||||||
|
|
||||||
|
|
||||||
class Requester(ABC):
|
class Requester(ABC):
|
||||||
|
|
Loading…
Reference in a new issue