@@ -47,34 +47,21 @@ class SidekiqManager(RESTManager):
47
47
This manager doesn't actually manage objects but provides helper fonction
48
48
for the sidekiq metrics API.
49
49
"""
50
- def __init__ (self , gl ):
51
- """Constructs a Sidekiq manager.
52
-
53
- Args:
54
- gl (gitlab.Gitlab): Gitlab object referencing the GitLab server.
55
- """
56
- self .gitlab = gl
57
-
58
- def _simple_get (self , url , ** kwargs ):
59
- r = self .gitlab ._raw_get (url , ** kwargs )
60
- raise_error_from_response (r , GitlabGetError )
61
- return r .json ()
62
-
63
50
def queue_metrics (self , ** kwargs ):
64
51
"""Returns the registred queues information."""
65
- return self ._simple_get ('/sidekiq/queue_metrics' , ** kwargs )
52
+ return self .gitlab . http_get ('/sidekiq/queue_metrics' , ** kwargs )
66
53
67
54
def process_metrics (self , ** kwargs ):
68
55
"""Returns the registred sidekiq workers."""
69
- return self ._simple_get ('/sidekiq/process_metrics' , ** kwargs )
56
+ return self .gitlab . http_get ('/sidekiq/process_metrics' , ** kwargs )
70
57
71
58
def job_stats (self , ** kwargs ):
72
59
"""Returns statistics about the jobs performed."""
73
- return self ._simple_get ('/sidekiq/job_stats' , ** kwargs )
60
+ return self .gitlab . http_get ('/sidekiq/job_stats' , ** kwargs )
74
61
75
62
def compound_metrics (self , ** kwargs ):
76
63
"""Returns all available metrics and statistics."""
77
- return self ._simple_get ('/sidekiq/compound_metrics' , ** kwargs )
64
+ return self .gitlab . http_get ('/sidekiq/compound_metrics' , ** kwargs )
78
65
79
66
80
67
class UserEmail (RESTObject ):
0 commit comments