1
+ from typing import Any , Dict , Union
2
+
3
+ import requests
4
+
1
5
from gitlab import cli
2
6
from gitlab import exceptions as exc
3
7
from gitlab .base import RESTManager
@@ -16,7 +20,7 @@ class SidekiqManager(RESTManager):
16
20
17
21
@cli .register_custom_action ("SidekiqManager" )
18
22
@exc .on_http_error (exc .GitlabGetError )
19
- def queue_metrics (self , ** kwargs ) :
23
+ def queue_metrics (self , ** kwargs : Any ) -> Union [ Dict [ str , Any ], requests . Response ] :
20
24
"""Return the registered queues information.
21
25
22
26
Args:
@@ -33,7 +37,9 @@ def queue_metrics(self, **kwargs):
33
37
34
38
@cli .register_custom_action ("SidekiqManager" )
35
39
@exc .on_http_error (exc .GitlabGetError )
36
- def process_metrics (self , ** kwargs ):
40
+ def process_metrics (
41
+ self , ** kwargs : Any
42
+ ) -> Union [Dict [str , Any ], requests .Response ]:
37
43
"""Return the registered sidekiq workers.
38
44
39
45
Args:
@@ -50,7 +56,7 @@ def process_metrics(self, **kwargs):
50
56
51
57
@cli .register_custom_action ("SidekiqManager" )
52
58
@exc .on_http_error (exc .GitlabGetError )
53
- def job_stats (self , ** kwargs ) :
59
+ def job_stats (self , ** kwargs : Any ) -> Union [ Dict [ str , Any ], requests . Response ] :
54
60
"""Return statistics about the jobs performed.
55
61
56
62
Args:
@@ -67,7 +73,9 @@ def job_stats(self, **kwargs):
67
73
68
74
@cli .register_custom_action ("SidekiqManager" )
69
75
@exc .on_http_error (exc .GitlabGetError )
70
- def compound_metrics (self , ** kwargs ):
76
+ def compound_metrics (
77
+ self , ** kwargs : Any
78
+ ) -> Union [Dict [str , Any ], requests .Response ]:
71
79
"""Return all available metrics and statistics.
72
80
73
81
Args:
0 commit comments