mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-12-01 19:06:45 +00:00
refactor(services): remove special storage counting from pleroma
This commit is contained in:
parent
f0d6ac624d
commit
df5b318fff
|
@ -4,7 +4,6 @@ import subprocess
|
||||||
import typing
|
import typing
|
||||||
from selfprivacy_api.jobs import Job, Jobs
|
from selfprivacy_api.jobs import Job, Jobs
|
||||||
from selfprivacy_api.services.generic_service_mover import FolderMoveNames, move_service
|
from selfprivacy_api.services.generic_service_mover import FolderMoveNames, move_service
|
||||||
from selfprivacy_api.services.generic_size_counter import get_storage_usage
|
|
||||||
from selfprivacy_api.services.generic_status_getter import get_service_status
|
from selfprivacy_api.services.generic_status_getter import get_service_status
|
||||||
from selfprivacy_api.services.service import Service, ServiceDnsRecord, ServiceStatus
|
from selfprivacy_api.services.service import Service, ServiceDnsRecord, ServiceStatus
|
||||||
from selfprivacy_api.utils import ReadUserData, WriteUserData, get_domain
|
from selfprivacy_api.utils import ReadUserData, WriteUserData, get_domain
|
||||||
|
@ -96,13 +95,6 @@ class Pleroma(Service):
|
||||||
def get_logs():
|
def get_logs():
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def get_storage_usage() -> int:
|
|
||||||
storage_usage = 0
|
|
||||||
storage_usage += get_storage_usage("/var/lib/pleroma")
|
|
||||||
storage_usage += get_storage_usage("/var/lib/postgresql")
|
|
||||||
return storage_usage
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_folders() -> typing.List[str]:
|
def get_folders() -> typing.List[str]:
|
||||||
return ["/var/lib/pleroma", "/var/lib/postgresql"]
|
return ["/var/lib/pleroma", "/var/lib/postgresql"]
|
||||||
|
|
Loading…
Reference in a new issue