fix: add type annotations to monitoring.py

This commit is contained in:
nhnn 2024-07-08 19:02:34 +03:00
parent 0834360961
commit 60c5e12946

View file

@ -1,18 +1,18 @@
import strawberry
from selfprivacy_api.utils.prometheus import PrometheusQueries
from selfprivacy_api.utils.prometheus import PrometheusQueries, PrometheusQueryResult
@strawberry.type
class Monitoring:
@strawberry.field
def disk_usage():
def disk_usage() -> PrometheusQueryResult:
return PrometheusQueries.disk_usage()
@strawberry.field
def memory_usage():
def memory_usage() -> PrometheusQueryResult:
return PrometheusQueries.memory_usage()
@strawberry.field
def cpu_usage():
def cpu_usage() -> PrometheusQueryResult:
return PrometheusQueries.cpu_usage()