Skip to content

Commit

Permalink
feat: standardized cli # 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Max KvR authored and devmaxde committed Nov 26, 2024
1 parent 26bd9e4 commit d393e84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions metricq_source_rabbitmq/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import aiomonitor
import click_log
from metricq.cli import metricq_command
from metricq.logging import get_logger

from .source import RabbitMqSource
Expand All @@ -36,12 +37,9 @@
)


@click.command()
@click.option("--server", default="amqp://localhost/")
@click.option("--token", default="source-rabbitmq")
@metricq_command(default_token="source-rabbitm")
@click.option("--monitor/--no-monitor", default=False)
@click.option("--log-to-journal/--no-log-to-journal", default=False)
@click_log.simple_verbosity_option(logger)
def source_cmd(server, token, monitor, log_to_journal):
if log_to_journal:
try:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"aiomonitor",
"click",
"click_log",
"metricq~=5.3",
"metricq[cli]~=5.4",
"aiohttp",
"yarl",
],
Expand Down

0 comments on commit d393e84

Please sign in to comment.