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 import strawberry
from selfprivacy_api.utils.prometheus import PrometheusQueries from selfprivacy_api.utils.prometheus import PrometheusQueries, PrometheusQueryResult
@strawberry.type @strawberry.type
class Monitoring: class Monitoring:
@strawberry.field @strawberry.field
def disk_usage(): def disk_usage() -> PrometheusQueryResult:
return PrometheusQueries.disk_usage() return PrometheusQueries.disk_usage()
@strawberry.field @strawberry.field
def memory_usage(): def memory_usage() -> PrometheusQueryResult:
return PrometheusQueries.memory_usage() return PrometheusQueries.memory_usage()
@strawberry.field @strawberry.field
def cpu_usage(): def cpu_usage() -> PrometheusQueryResult:
return PrometheusQueries.cpu_usage() return PrometheusQueries.cpu_usage()