mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-22 04:01:27 +00:00
fix: add type annotations to monitoring.py
This commit is contained in:
parent
0834360961
commit
60c5e12946
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue