@@ -47,34 +47,21 @@ class SidekiqManager(RESTManager):
4747 This manager doesn't actually manage objects but provides helper fonction
4848 for the sidekiq metrics API.
4949 """
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-
6350 def queue_metrics (self , ** kwargs ):
6451 """Returns the registred queues information."""
65- return self ._simple_get ('/sidekiq/queue_metrics' , ** kwargs )
52+ return self .gitlab . http_get ('/sidekiq/queue_metrics' , ** kwargs )
6653
6754 def process_metrics (self , ** kwargs ):
6855 """Returns the registred sidekiq workers."""
69- return self ._simple_get ('/sidekiq/process_metrics' , ** kwargs )
56+ return self .gitlab . http_get ('/sidekiq/process_metrics' , ** kwargs )
7057
7158 def job_stats (self , ** kwargs ):
7259 """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 )
7461
7562 def compound_metrics (self , ** kwargs ):
7663 """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 )
7865
7966
8067class UserEmail (RESTObject ):
0 commit comments