refactor(services): remove special storage counting from nextcloud

This commit is contained in:
Houkime 2023-04-17 14:19:15 +00:00
parent 4475bcea45
commit 617f7f1628

View file

@ -4,7 +4,6 @@ import subprocess
import typing
from selfprivacy_api.jobs import Job, Jobs
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.service import Service, ServiceDnsRecord, ServiceStatus
from selfprivacy_api.utils import ReadUserData, WriteUserData, get_domain
@ -113,15 +112,6 @@ class Nextcloud(Service):
"""Return Nextcloud logs."""
return ""
@staticmethod
def get_storage_usage() -> int:
"""
Calculate the real storage usage of /var/lib/nextcloud and all subdirectories.
Calculate using pathlib.
Do not follow symlinks.
"""
return get_storage_usage("/var/lib/nextcloud")
@staticmethod
def get_folders() -> typing.List[str]:
return ["/var/lib/nextcloud"]