| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 954656e commit fbf2bfe
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,7 @@ | |||
| 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: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,6 @@ files = "." | |||
| 12 | 12 | module = [ | |
| 13 | 13 | "docs.*", | |
| 14 | 14 | "docs.ext.*", | |
| 15 | - "gitlab.v4.objects.sidekiq", | ||
| 16 | 15 | "tests.functional.*", | |
| 17 | 16 | "tests.functional.api.*", | |
| 18 | 17 | "tests.meta.*", | |
| Back | FazBrowse Home | New Git URL |
0 commit comments